Python iterators & generators and why to use generators over list comprehensions (with examples and code)

If you are interested in developing Python apps in a more elegant way, you care about performance or you just want to learn more advanced aspects of Python — this article is for you.

In this article, I explain, step-by-step, on how to create custom iterators & generators, so even a…

--

--

--

Data Scientist with 5+ years of broad-based experience in building data-intensive solutions for diverse industries

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Why I want to become a Software Engineer at Holberton School.

10 Microsoft Teams management tips for IT admins

3 Reasons for Personal Branding after 10 years as Software Developer

VulnHub: Funbox: Rookie

C Program for LU Factorization — LU in C

Working with identity in .NET Core 2.0

How to run Jenkins using the root user in Linux (CentOS)

5 Free OpenCV and Computer Vision Best Online Courses for Beginners in 2022

5 Best Free OpenCV and Computer Vision Courses for Beginners

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Maciej Zalwert

Maciej Zalwert

Data Scientist with 5+ years of broad-based experience in building data-intensive solutions for diverse industries

More from Medium

Tutorial: Write The Sims 4 Script Mod with Python — Part 1: Introduction

Using the U.S. Census Bureau API with Python

Beginner’s guide to operations research with Python. Part 2: Transportation

Amino Meenie Miney Moe — How to Characterise Protein Domains