+ 2
Here,how this program prints the output as 1111.0 ??what about underscore?
a='11_11' print(float(a)) Even the 'infinity' is printed as inf why?
3 Respuestas
+ 11
The underscore is a possibility to group numbers for better readability. It can be used in a string representation or in an int value.
a='11_11'
print(float(a))
print(10_000)
+ 5
New feature from version 3.6
https://staging.python.org/dev/peps/pep-0515/
+ 3
Thanks i understood