🐿️
12

My friend's first Python script crashed because they used '=' instead of '==' in an if statement.

They spent two hours debugging before I spotted it. That single character difference is such a common trip-up when you're starting out. What other tiny syntax errors gave you the most grief early on?
2 comments

Log in to join the discussion

Log In
2 Comments
eric_carr
eric_carr1d ago
Two hours for one typo seems like overkill lol.
2
thomasw48
thomasw481d ago
Actually, two hours for that is pretty normal when you're new. You don't know what you're looking for yet, so you check everything. The error message doesn't say "wrong operator in line 5." You have to learn how to read those messages. My early one was forgetting the colon at the end of a for loop. It just looks like part of the line until you know.
2