8
My first Python script printed the same line 10,000 times
I was at my kitchen table trying to make a simple loop to count to ten. I messed up the indentation and used a print command inside the wrong block. Suddenly, my terminal just kept scrolling the same sentence over and over. I panicked and closed the whole program, losing my work. What's the silliest mistake you made when starting out?
3 comments
Log in to join the discussion
Log In3 Comments
finleyf881mo ago
That "right of passage" with the frozen terminal reminds me of a friend who accidentally made an infinite loop in a college computer lab. The whole shared printer just started churning out page after page of the same line. I mean, who hasn't had that moment of pure panic when the code runs away from you?
8
simonp472mo ago
Oh, the classic runaway print loop. I did something just like that, but with a while loop I forgot to increment. I left it running to grab a coffee and came back to a completely frozen terminal. Had to force quit and everything. It’s a right of passage, really. Makes you double-check your conditions forever after.
2