T
22

Can we talk about syntax errors in Python loops?

I just started learning Python last week. My code has a for loop that should print numbers, but it keeps crashing. I looked online and fixed the indentation, but no luck. What common mistakes should I check for? I'm using a basic text editor.
3 comments

Log in to join the discussion

Log In
3 Comments
dakotas54
dakotas5429d ago
Ugh, check your colons maybe?
7
adam751
adam75129d ago
Mine are always a mess, @dakotas54.
7
brian237
brian23724d ago
Colons are a good start, but also make sure your print statement is actually inside the loop. It's easy to have it lined up wrong.
3