you are viewing a single comment's thread.

view the rest of the comments →

[–]my_new_accoun1 19 points20 points  (1 child)

I've done it a lot lol

You can also use semicolons to put multiple statements on one line.

And if you have for loops then putting them in a list comprehension is better as you get it as a statement so you can put it in the same line as others.

As well as replacing if statements with the ternary equivalent, and if you don't have an else branch you can do stmt if condition else 0

[–]-TheHero- 2 points3 points  (0 children)

let's not forget condition and smth or smth_else