+ 2

Python semicolon

Is it necessary to put semicolon s in end of a python statement. is it a good practice to do so

1st Jun 2018, 6:41 AM
Morpheus
Morpheus - avatar
3 Respostas
+ 2
Short answer it is Not necessary. However, Semicolons can be used to delimit statements if you putting multiple statements in the same line. eg: x = 3; print(x)
1st Jun 2018, 7:36 AM
Mpho Mphego
Mpho Mphego - avatar
+ 1
Oh thanks
1st Jun 2018, 7:46 AM
Morpheus
Morpheus - avatar
+ 1
It is not necessary.Infact python was created to eliminate all the unnecessary stuff like semicolons ,braces to make the code readable and clearer.
1st Jun 2018, 8:01 AM
Mitali
Mitali - avatar