ee.List.zip
Pairs the elements of two lists to create a list of two-element lists. When the input lists are of different sizes, the final list has the same size as the shortest one.
Usage | Returns |
---|
List.zip(other) | List |
Argument | Type | Details |
---|
this: list | List | |
other | List | |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-05 UTC.
[null,null,["Last updated 2024-06-05 UTC."],[[["`List.zip` combines two lists by pairing corresponding elements, creating a new list of two-element lists."],["The resulting list's length is determined by the shorter of the two input lists, ensuring all elements have a pair."]]],["Combines two lists into a single list of two-element lists, pairing corresponding elements. The resulting list's length matches the shorter of the two input lists. The `List.zip(other)` function takes two list arguments: `this`, representing the initial list, and `other`, the second list. It returns a new List containing paired elements. If the lists are of differing lengths, extra items in the longer list are not included.\n"]]