19
Spent a whole weekend stuck on a simple Python list error
I was working on a small project to track my daily habits. My code kept crashing with an 'index out of range' error every time I tried to add a new item. I checked my loops and conditions for hours, thinking it was a logic problem. It turned out I had accidentally typed 'list.append' instead of 'list.append()' on one line, missing the parentheses. Has anyone else lost a ton of time to a tiny syntax mistake like that?
2 comments
Log in to join the discussion
Log In2 Comments
jason_hunt271mo ago
Actually, that kind of tiny mistake is a sign of sloppy coding, not bad luck.
9
the_sarah1mo ago
Yeah that's the worst. Feels like @jason_hunt27 is missing the point. Happens with everything, like forgetting the 'send' button on an email.
1