You have written hundreds of for loops, over lists, strings, ranges and dictionaries, and they all worked the same way. Behind that sameness is a small agreement called the iterator protocol, and it is worth understanding, because generators, comprehensions, zip, map and files all use it. This lesson takes a for loop apart.
More lessons in Complete Python Programming