Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain Earth Engine access.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eList.cat()\u003c/code\u003e combines the elements of two lists into a new, single list, preserving the original order of elements.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts two arguments: the initial list (\u003ccode\u003ethis\u003c/code\u003e) and the list to append (\u003ccode\u003eother\u003c/code\u003e), both of type \u003ccode\u003eList\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe function returns a new \u003ccode\u003eList\u003c/code\u003e containing all elements from both input lists.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eList.cat()\u003c/code\u003e handles empty lists gracefully, returning the non-empty list if one is empty, or an empty list if both are empty.\u003c/p\u003e\n"]]],["The `List.cat(other)` function concatenates the elements of one list (`other`) onto another list (`list`). It returns a new `List` object containing all elements. The function works with various data types, including strings, numbers, and nested lists. If either list is empty, the function returns the other list. If both are empty, it returns an empty list. `getInfo()` can be used to return the contents of the list.\n"],null,["Concatenates the contents of other onto list.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------|---------|\n| List.cat`(other)` | List |\n\n| Argument | Type | Details |\n|--------------|------|---------|\n| this: `list` | List | |\n| `other` | List | |\n\nExamples\n\nCode Editor (JavaScript) \n\n```javascript\nprint(ee.List(['dog']).cat(['squirrel'])); // [\"dog\",\"squirrel\"]\nprint(ee.List(['moose']).cat(['&', 'squirrel'])); // [\"moose\",\"&\",\"squirrel\"]\n\nprint(ee.List([['a', 'b']]).cat(ee.List([['1', 1]]))); // [[\"a\",\"b\"],[\"1\",1]]\n\nprint(ee.List([]).cat(ee.List([]))); // []\nprint(ee.List([1]).cat(ee.List([]))); // [1]\nprint(ee.List([]).cat(ee.List([2]))); // [2]\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\nColab (Python) \n\n```python\nprint(ee.List(['dog']).cat(['squirrel']).getInfo()) # ['dog', 'squirrel']\n\n# ['moose', '&', 'squirrel']\nprint(ee.List(['moose']).cat(['&', 'squirrel']).getInfo())\n\n# [['a', 'b'], ['1', 1]]\nprint(ee.List([['a', 'b']]).cat(ee.List([['1', 1]])).getInfo())\n\nprint(ee.List([]).cat(ee.List([])).getInfo()) # []\nprint(ee.List([1]).cat(ee.List([])).getInfo()) # [1]\nprint(ee.List([]).cat(ee.List([2])).getInfo()) # [2]\n```"]]