B
7

Just realized my entire Python script broke because I used a comma instead of a dot

I was trying to make a simple calculator in my room last night and it kept giving me a 'TypeError' for over an hour. Turns out I wrote 'print(total,2)' instead of 'print(total.2)' when trying to show two decimal places. Has anyone else lost a bunch of time on a tiny syntax mistake like that?
3 comments

Log in to join the discussion

Log In
3 Comments
the_amy
the_amy19h ago
Oh man, "over an hour" on a comma. I once spent a whole afternoon because I used a single equals sign in an 'if' statement instead of a double. The error message was about something else entirely, so I just kept rewriting the wrong part of the code.
10
ninas67
ninas6718h ago
Ugh that's the worst, @the_amy. I finally learned to just walk away for ten minutes when I'm stuck like that. Coming back fresh usually spots the tiny mistake right away.
5
jennifer204
Remember when curly quotes from a Word doc would break HTML? Tbh I copied some text over and it took me forever to find those sneaky quote marks. They look the same but the code just dies.
6