Spent 6 hours debugging a for loop that was missing one semicolon, am I the only one who does this?
I started learning Python about 3 months ago and thought I was hot stuff after building a little number guessing game. Then I tried to make a simple program that counts how many even numbers are in a list and it kept printing the wrong total. I stared at it for two hours, rewrote the whole loop twice, Googled stuff like why is my counter wrong, and even closed my laptop and walked around the block. When I came back, I saw I had written total = total + i inside the loop but I forgot the colon on the for line. One tiny colon. Six hours of my life for one character. My roommate who codes for his job laughed and said he did the same thing with a missing semicolon in Java a few years ago. So I gotta ask, is this just a rite of passage for every beginner or is there some trick you use to spot these dumb little mistakes faster? Because I can't keep losing whole Saturdays to a single punctuation mark.