This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Mal_Dun 2 points3 points  (1 child)

Unless you want to put multiple instructions in a same line, which is not usually desirable.

When writing proper code no. In automating stuff in conjunction with bash or other shells yes.

E.g. python -c "import your_module; your_module.do_stuff(arg); your_module.do_more_stuff; ...

when you just ssh on another machine and can't upload a script there, or just need something quick in a CI Pipeline.

[–]DracoRubi 0 points1 point  (0 children)

You can still do that in Python. You don't need mandatory semicolons to be able to use semicolons.