Loop better: a deeper look at iteration in Python

What's the difference between an iterable, an iterator, and a generator? Do you know how to create infinitely long iterables? Come to this talk to learn some of Python's slightly more advanced looping techniques.

Iterables are a very big deal in Python and they became even more important in Python 3. There's quite a bit beyond the basics when it comes to loops and looping in Python. Let's learn some of Python's slightly more advanced looping techniques!

In this session, we'll take a step back and learn about how looping actually works in Python. We'll then learn about a number of Python looping techniques that you've probably overlooked.

We'll learn about the difference between sequences, iterables, and iterators. We'll also reveal the iterator protocol that powers for loops in Python.

After we learn the basics, we'll learn some techniques for working with infinite infinite iterables, generators, and generator expressions.

Attendees will walk away from this session with specific actionable recommendations for refactoring their own code as well as a wealth of new topics to look deeper into after the session.

Presented by

Trey Hunner

Trey Hunner is a Python/Django teacher, trainer, and mentor. He is a director at the Python Software Foundation, a member of the Django Software Foundation, and is heavily involved with his local Python meetup group in San Diego.

Trey holds corporate training sessions on Python and Django by day and hosts live online teaching sessions for Python learners during nights and weekends.