-2

I got a SyntaxError: can't assign to operator when I typed in a boolean. How can I fixed it? Below is the code that popped a error:

Super-Sport = False
                  ^
SyntaxError: can't assign to operator

I expect it will run smoothly, but it didn't

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Pi-top
  • 1
  • See [Why python does not allow hyphens](http://stackoverflow.com/questions/2064329/why-python-does-not-allow-hyphens) – Gino Mempin Aug 11 '19 at 10:46

1 Answers1

0

Change Super-Sport to Super_Sport (or SuperSport etc). Python is interpreting the - as minus and causing your syntax error.

MurrayW
  • 393
  • 2
  • 10