semicolon at end of python's statements

Ned Batchelder ned at nedbatchelder.com
Wed Aug 28 20:38:38 EDT 2013


On 8/28/13 8:18 PM, Mohsen Pahlevanzadeh wrote:
> Dear all,
>
> I'm C++ programmer and unfortunately put semicolon at end of my
> statements in python.
>
> Quesion:
> What's really defferences between putting semicolon and don't put?
There is no difference.  The semicolon is unnecessary in Python.  If you 
include them, people will know that you are still thinking in another 
language.

Full disclosure: you can separate statements on a line with semicolons, 
but this practice is strongly discouraged.

--Ned.
> Yours,
> Mohsen
>




More information about the Python-list mailing list