is semicolon is used to terminate the line in Python as we do in c/c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

is semicolon is used to terminate the line in Python as we do in c/c++

5th Nov 2016, 8:10 AM
Abhishek Kumar
Abhishek Kumar - avatar
9 Answers
+ 22
No, the compiler doesn't need semicolon to understand that the line of code has ended
5th Nov 2016, 8:18 AM
Evcheto Novakova
Evcheto Novakova - avatar
+ 6
Python in fact treats most lines as atomic, unless they end with an unfinished {, (, [ or the literal continuation: \.
5th Nov 2016, 8:28 AM
Kirk Schafer
Kirk Schafer - avatar
+ 2
Python works on line to line compilation. so, you don't have to give semicolons to end the statement.
5th Nov 2016, 6:07 PM
Sandeep Taksande
Sandeep Taksande - avatar
+ 1
yes you have to use semicolon in python for terminating the statement if you are going to write a next statement in the same line otherwise it's not necessary to use in python.
16th Nov 2016, 9:38 AM
Manthan
Manthan - avatar
+ 1
No it's not all needed
30th Jul 2017, 10:15 AM
Ram Mahesh
Ram Mahesh - avatar
0
semicolon just states that it is a single segment or statement of code, just as a period is used in a general English sentence.
5th Nov 2016, 10:18 AM
Shivnay Swamy
Shivnay Swamy - avatar
0
no we dont use a semicolon as we do in c++.instead we leave it alone
23rd Nov 2016, 6:53 AM
Evans Marvin R.C
Evans Marvin  R.C - avatar
- 1
it is possible
5th Nov 2016, 9:48 AM
Aratilatla.siva chaitanya
Aratilatla.siva chaitanya - avatar
- 5
oh fuck
7th Dec 2016, 3:53 PM
amirhani allhyari
amirhani allhyari - avatar