I've just noticed 0-padding is not allowed in Python and I was wondering why this choice was made?
For example:
a = 09
doesn't work while
a = 9
does
How's that?!
Thank you very much for your answers!
Python, as many other languages, treat numbers starting with 0 as being in octal notation. 09 is not valid as octal
See chapter 2.4.4 in the python language reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With