3 Respuestas
+ 3
It treat new line as a new statement and instead of curly braces it use indention
+ 2
you can use semi-colons in python if you like , but it's not necessary like other languages . because python use indentation
+ 2
A semicolon in Python denotes separation, rather than termination. It allows you to write multiple statements on the same line. This syntax also makes it legal to put a semicolon at the end of a single statement. So, it’s actually two statements where the second one is empty.
Input:
print('I')
print('like')
print('to help')
Output:
I
like
to help
#Or_____
print('I');print('like');print('to help')
I
like
to help
__________
Check out this link for further explanation:
https://www.askpython.com/python/examples/semicolon-in-python#:~:text=A%20semicolon%20in%20Python%20denotes,the%20second%20one%20is%20empty.