6 Réponses
+ 6
Normally used to create errors and dumping code
u can write more than one statement in one line
also some javaists cant let it go.
+ 1
Can you show us the specific piece of code?
+ 1
Writing a semicolon in Python is nonsense.
In other languages, like C, Java, C# etc., a semicolon marks the end of the statement. That gives them freedom to deal with whitespace as they want.
In Python, whitespace determines what belongs to what, but you don't need {} or semicolon.
; in Python makes sense *only* if you insist on writing several statements in one line.
print(1); print(2)
+ 1
Yeah, ^ agree. That got me confused. shouldn't use diff languages habits in python.
0
At the end of line of codes
..
arr = list(range(15));
print(arr);
False;
etc