Possible Duplicate:
How do you express binary literals in Python?
When using the interactive shell:
print 010
I get back an 8.
I started playing around using other numbers having zeroes before (0110 = 72, 013 = 11) but I could not figure it out...
What is going on here?
Numbers entered with a leading zero are interpreted as octal (base 8).
007 == 7
010 == 8
011 == 9
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