This is the Python notebook version of the article by Dionysia Lemonaki originally published on https://www.freecodecamp.org/news/list-comprehension-in-python-with-code-examples.
Feel free to copy of the notebook and play with the source code.
- On GitHub, open the ipynb file in this repository. You will see a static version of the notebook. To run the interactive version, follow these steps:
- Click on the "Open in Colab" button
- From Google Colab, click on "Copy to Drive" to save the notebook to your account. Then you can edit and run the code examples.