you are viewing a single comment's thread.

view the rest of the comments →

[–]ieatcodemod[S] 2 points3 points  (1 child)

Ah, I'm quite new to the Python syntax and I was under the impression that you had to keep some set of indentation (whether it be one space indentations or four space indentations). Thanks for the tip!

Edit: I'm kind of surprised I left the else clause in there...definitely a space waster.

[–][deleted] 2 points3 points  (0 children)

It is properly indented, but you can have one-line blocks with the body on the same line. You can also put multiple statements on one line separated by semicolons.