Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are no exceptions. You only need it if/when you want to put multiple statements on a single line. That's its sole purpose.

And I'd also add that it's something that you almost never do. One practical use is writing single line scripts that you pass to the interpreter on the command line. E.g. `python -c 'print("first command"); print("second command")'`

If you don't know about the `;` at all in python then you are 100% fine.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: