0
Why isint this working? Help me pls :c
Im trying to put in this value in python: dollar = 1.000.000 ^ SyntaxError: invalid syntax It is accepting the first dot but not the second dot, why?
4 Respuestas
+ 4
To separate sections of your literal number like this you can use the _ underscore
So, for instance, 1 million can be represented like;
mil = 1_000_000
print(mil) # 1000000
The use of a . (dot, period, decimal) signifies that the number is a floating point value and only 1 dot may be used in its literal representation.
+ 2
ChaoticDawg i see, thank you!
+ 1
TheCoder thank you !