+ 1

Semicolon is used in python as separator are there any other uses to it?

I googled and found that semicolon is used as a separator (not mentioned in sololearn class). My question is are there any uses other than this? a=8;a=a/2;b=6 print(a,"\n",b) ####output## 4.0 6

12th Jun 2018, 9:33 AM
Sujith
5 Respostas
+ 7
Semicolons are used in Python only in the exec() function or to do multiple tasks in 1 line.
12th Jun 2018, 9:43 AM
Christopher
Christopher - avatar
+ 4
It's the same; semicolon can be used to execute multiple lines with 1 exec() function.
12th Jun 2018, 12:15 PM
Christopher
Christopher - avatar
+ 2
It's the same; semicolon can be used to execute multiple lines with 1 exec() function.
12th Jun 2018, 12:15 PM
Christopher
Christopher - avatar
+ 1
Christopher Ivan Sorry but what you mean with "Semicolon are used in the exec() function" ? I have not used much then maybe i dont know something in it...
12th Jun 2018, 11:28 AM
KrOW
KrOW - avatar
0
Christopher Ivan Then ; its used only like multiple statement in line separator 😉
12th Jun 2018, 12:19 PM
KrOW
KrOW - avatar