Actually I am beginner in Python. I just want to know why python gives error on print of integer which is starting with 0 (non single digit)
for e.g. if I type 09
in integer then on printing it gives error
SyntaxError: invalid token
Actually I am beginner in Python. I just want to know why python gives error on print of integer which is starting with 0 (non single digit)
for e.g. if I type 09
in integer then on printing it gives error
SyntaxError: invalid token
0 at the beginning of a numeric literal is used to tell python which base to use, for example: 0x12.
Using 09
you are expressing 9 in octal base but 9 is not a valid digit in that base and thus the error.