📢
6

I finally got my first Python script to run without errors last week

I've been trying to learn Python for a couple months now, mostly just doing tutorials online. Last Tuesday, I wrote a little script that takes a list of numbers and finds the biggest one. It was only 5 lines, but I kept getting a syntax error on line 3 for like an hour. I finally realized I had a colon in the wrong spot. When it finally ran and printed the right answer, I actually yelled a little. It's a tiny thing, but it felt huge. Has anyone else had a moment where a simple fix made everything click?
3 comments

Log in to join the discussion

Log In
3 Comments
victorcoleman
Remember my buddy trying to code a dice roller. Dude spent three days stuck because he used one equals sign instead of two. His scream when it finally worked scared his cat.
7
colemartinez
That story about the dice roller and the equals sign is the perfect example. I read a blog post once where a guy said debugging is just a long series of tiny, stupid mistakes. He said the real skill isn't writing the code, it's learning how to spot your own dumb typos. That moment when you find the one wrong character and everything works, it's like a puzzle finally snapping into place. It feels good because you solved the problem yourself, even if the fix was simple.
7
spencer664
spencer66414d agoMost Upvoted
Man, that colons thing got me too. I spent two hours on a loop that just wouldnt run. Turns out I put the colon after the word "for" instead of at the end of the line. Felt like such a dummy when I saw it. But once I fixed that one character, I started actually understanding how loops work instead of just copying examples.
6