<jupyter_start><jupyter_text>[![colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/davemlz/eemont/blob/master/docs/tutorials/022-Overloaded-Operators-List.ipynb)[![Open in SageMaker Studio Lab](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/davemlz/eemont/blob/master/docs/tutorials/022-Overloaded-Operators-List.ipynb)[![Open in Planetary Computer](https://img.shields.io/badge/Open-Planetary%20Computer-black?style=flat&logo=microsoft)](https://pccompute.westeurope.cloudapp.azure.com/compute/hub/user-redirect/git-pull?repo=https://github.com/davemlz/eemont&urlpath=lab/tree/eemont/docs/tutorials/022-Overloaded-Operators-List.ipynb&branch=master)  Overloaded Operators for the ee.List Object Class _Tutorial created by **<NAME>**_: [GitHub](https://github.com/davemlz) | [Twitter](https://twitter.com/dmlmont)- GitHub Repo: [https://github.com/davemlz/eemont](https://github.com/davemlz/eemont)- PyPI link: [https://pypi.org/project/eemont/](https://pypi.org/project/eemont/)- Conda-forge: [https://anaconda.org/conda-forge/eemont](https://anaconda.org/conda-forge/eemont)- Documentation: [https://eemont.readthedocs.io/](https://eemont.readthedocs.io/)- More tutorials: [https://github.com/davemlz/eemont/tree/master/docs/tutorials](https://github.com/davemlz/eemont/tree/master/docs/tutorials)  Let's start! If required, please uncomment:<jupyter_code>#!pip install eemont
#!pip install geemap<jupyter_output><empty_output><jupyter_text>Import the required packges.<jupyter_code>import ee, eemont, geemap<jupyter_output><empty_output><jupyter_text>Authenticate and Initialize Earth Engine and geemap.<jupyter_code>Map = geemap.Map()<jupyter_output><empty_output><jupyter_text>Let's define some ee.List objects:<jupyter_code>L1 = ee.List.sequence(0,4)
L2 = ee.List.sequence(5,9)<jupyter_output><empty_output><jupyter_text>Overloaded Operators `eemont` has overloaded the binary operators in the following list for the `ee.List` class:(+, \*\)Therefore, you can now use them for list operations!  Concatenation Concatenate two or more ee.List objects using the `+` Overloaded Operator:<jupyter_code>L3 = L1 + L2<jupyter_output><empty_output><jupyter_text>The result is stored as an ee.List class. Let's check it:<jupyter_code>L3.getInfo()<jupyter_output><empty_output><jupyter_text>Repeat Repeat a list n times using the `*` Overloaded Operator:<jupyter_code>L4 = ee.List([10]) * 5<jupyter_output><empty_output><jupyter_text>Check the result:<jupyter_code>L4.getInfo()<jupyter_output><empty_output><jupyter_text>Here is another example:<jupyter_code>L5 = L3 * 2<jupyter_output><empty_output><jupyter_text>Check the result:<jupyter_code>L5.getInfo()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15152603231597844, 'fraction_numerical': 0.010771992818671455, 'mean_word_length': 7.572307692307692, 'pattern_counts': {'":': 0, '<': 42, '<?xml version=': 0, '>': 42, 'https://': 19, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '492120', 'license': 'MIT', 'n_tokens_mistral': 1105, 'n_tokens_neox': 1049, 'n_words': 132, 'path': 'docs/tutorials/022-Overloaded-Operators-List.ipynb', 'repo_name': 'barbedorafael/eemont', 'size': '2799'}