O
17

Appreciation post: The $12 book that finally taught me why my loops were breaking

I've been messing with Python for about a year now and kept hitting the same wall where my for loops would just crash or skip over stuff. Last Tuesday I picked up a used copy of "Automate the Boring Stuff" for 12 bucks at a thrift store in Portland. The author explained how range() works in a way that finally clicked for me after like 3 tries. I spent that whole night rewriting old projects and fixing bugs I'd been ignoring for months. It's not fancy or new or whatever but man it saved me a ton of frustration. Has anyone else had a random cheap resource that just made something click out of nowhere?
2 comments

Log in to join the discussion

Log In
2 Comments
phoenix_adams60
That exact book saved my bacon too, same situation - I'd been copying loops from stack overflow without understanding them and the section on enumerate() was like a lightbulb finally turning on (even though I'd read the docs like five times before).
6
wright.jesse
Burned three days once because I thought enumerate() was some kind of fancy calculator function... felt real smart when I finally googled it.
2