Took me 6 tries to get a basic Python loop right, but it finally clicked
I kept seeing people say loops are easy and felt dumb when mine kept crashing. My code only ended up printing the last item in the list every time. Finally realized I forgot to indent the print statement inside the loop body. After moving that one line over, it ran perfectly on the 6th attempt. That little mistake taught me more than any tutorial did. Has anyone else had a tiny syntax slip that made everything fall into place?
Whoa, SIX tries just for an indent? That's brutal. I definitely feel that though. Python is so picky about spaces that one blank line or a weird tab will just wreck everything. I remember spending an hour on a loop that kept giving me the wrong total, and it turned out I had a stray space before my variable name. That one character made the whole thing act like a ghost variable.