+ 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
5 Respostas
+ 7
Semicolons are used in Python only in the exec() function or to do multiple tasks in 1 line.
+ 4
It's the same; semicolon can be used to execute multiple lines with 1 exec() function.
+ 2
It's the same; semicolon can be used to execute multiple lines with 1 exec() function.
+ 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...
0
Christopher Ivan Then ; its used only like multiple statement in line separator 😉