Python: Does someone know how this momentary bug occurs and how to evade it? [closed]

  python, syntax, syntax-error

While preparing the comments of a simple Python program on Colab, here is what happened:

from time import process_time

We initialize the quit variable, used to monitor if we pressed the q key

quit = False

compiling the latter gave me the following error: (!!!)

quit(= False)
    ^ wrong syntax!

After the restart it worked normally.

Unfortunately I did not took a picture of it.

I know it is very silly, but such simple error could mess up with a whole project.
Could you explain how could I have ‘achieved’ this?

Source: Python Questions