Python error Python can't assign to literal

604    Asked by BellaBlake in Python , Asked on Jul 23, 2021

I am trying to run very simple code in python. 

I am getting an error on this

a = 2, b =4

The way you're assigning variables is not correct to solve python can't assign to literal. This way is perfect for java or C but not for python. try something like this:

a, b, = 2, 4
or
a = 2
b = 4

Your Answer

Interviews

Parent Categories