Loop better: a deeper look at iteration in Python @NorthBayPython
Loop better: a deeper look at iteration in Python  @NorthBayPython
Uploaded December 2017 | Updated September 2026, 11 hours ago
Trey Hunner

2017.northbaypython.org/schedule/presentation/19

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.

About North Bay Python

A single-track conference north of the Golden Gate, focused on community, collaboration, and all things Python.

North Bay Python is a two-day, single-track Python conference held at the Mystic Theatre in Historic Downtown Petaluma, California, over the weekend of December 2 & 3, 2017.

We're a nonprofit conference for professionals, enthusiasts and students alike. We're focused on inclusion, accessibility, diversity, and affordability. Most importantly, we're planning a great lineup of talks from all over the Python ecosystem, with plenty of time to meet new people and develop new ideas.

Our venue, the Mystic Theatre in Downtown Petaluma, is a beautiful example of an early 1900s Vaudeville theatre. You can find over 50 different food and drink options a short walk away, and the nearest hotel is only a block away.

A Python conference north of the Golden Gate


North Bay Python is a single-track conference with a carefully curated set of talks representing the diverse Python community and their different areas of interest.

If a topic is less to your interest, or you've met some people you really want to sit down and chat with, we'll have plenty of areas away from the main theatre to catch up and chat.

Our goal is to keep prices as low as possible. That means we won't be catering lunch. Instead, you can look forward to extra-long lunch breaks you can use to explore all of the great food options around the venue.
Loop better: a deeper look at iteration in PythonThe Ironies of Automation in the Age of AI - amanda casari - 2026Developing Labs for Teaching Kids Webdev - Matt Cengia (North Bay Python 2023)2FA MindPrompt engineering & social justice: what we know so far - Tilde (Nbpy2025)From FinTech to Fin Tech - Adrianna Tan (Nbpy2025)Disambiguation, In-Jokes, and Name Collisions: What You Need to Know When Naming a Python ProjectNutshell in a Python: Adapting patterns from shell scriptsWhat Not To Document And Why - Margaret Fero (Nbpy2024)Cursed Comedy - Jamie Bliss and Piper Thunstrom - 2026Auditing Your Site for Accessibility: Now What?How Unreliable Computers Can Usually Agree (Sort Of): A Brief Tour of the Raft Algorithm
North Bay Python |

Loop better: a deeper look at iteration in Python

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER