0

I am learning python from scratch but while learning i received an error while initializing a value of 01000 to a variable. Well, I don't know why I'm receiving this kind of error.

>>> a = 01000
  File "<stdin>", line 1
    a = 01000
            ^
SyntaxError: invalid token

1 Answers1

0

The problem is the 0 at the start. Try this:

a = 1000

It doesn`t matter because

01000 = 1000

Except if you mean it in binary. Then I advise to use strings:

a = "01000"
hackerer
  • 159
  • 6