Impostors • How Even The Python Docs Get This Wrong* • [Club]
*Spoiler alert: The docs don’t really get it “wrong”
Can you spot all the errors in the following paragraph? There are several:
Two functions that enable you to work effectively with loops in Python are
zip()andenumerate(). Along with therange()function, they’re some of the most common tools you’ll see inforloops. And when you master them, you can start exploring the functions in theitertoolsmodule.
The correct number of errors in this text is either four or zero. Confused? I don’t blame you. And here’s a bit more confusion for you. It doesn’t matter either way.
Let’s talk about impostors in Python.
It’s likely that one of the first examples you saw when learning about for loops used the range() function as part of the for statement.
But you were fooled. That example, whichever one it was, didn’t do such a thing.


