The Python Papers

The Python Papers

Python 101 - The for Loop

Mike Driscoll's avatar
Mike Driscoll
Nov 17, 2025
∙ Paid

There are many times when you are writing code that you will need to process each object in a collection. In order to do that you will iterate over that collection, which means getting each object from that collection one at a time. Collections of objects include strings such as “Hello, world”, lists like [1, 2, 3], and even files. The process of iterat…

Keep reading with a 7-day free trial

Subscribe to The Python Papers to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Mike Driscoll · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture