Hi I accidentally entered the following code which I thought would result in some syntax error. But Python (3.8) executed normally and seems to concatenate the integers?
>>> 1_2
12
>>> 1.0_1.0
SyntaxError: invalid syntax
>>> 1.0_11
1.011
>>> 11_1.0
111.0
What is the _
doing exactly and when do people use that?
What is the correct term for the underscore operation? It is not an operator isn't it? Since the following syntax does not work:
>>> 1_ 1
SyntaxError: invalid syntax
>>> 1 _1
SyntaxError: invalid syntax
>>> 1 _ 1
SyntaxError: invalid syntax