eemont.eeList.__getitem__
- eemont.eeList.__getitem__(self, key)[source]
Gets the item of the list according to the specified key.
- Parameters
self (ee.List) – List to get the items from.
key (numeric | list[numeric] | slice) – Key used to get the specified item. If numeric, it gets the item at that index. If list, it gets multiple items. If slice, it calls the slice() method (the step parameter is ignored).
- Returns
List or number with the selected items.
- Return type
ee.List | ee.Number
Examples
>>> import ee, eemont >>> ee.Authenticate() >>> ee.Initialize() >>> eeList = ee.List([1,2,3,5]) >>> eeList[0].getInfo() 1 >>> eeList[0:2].getInfo() [1,2,3] >>> eeList[0:].getInfo() [1,2,3,5] >>> eeList[[0,2]].getInfo() [1,3]