SyntaxError: can't assign to literal


File “”, line 1
(“product”) = (“x”)
SyntaxError: can’t assign to literal

Please help!

I am new to programming


what are you trying to do?

why are all the parentheses in the code? Python generally requires very few parentheses.


The context of this line states that you are trying to set a value for a variable. The problem however is that (“product”) is not a valid name for creating a variable in python.
just product as variable name should suffice.
More information about this can be found here

Furthermore you are setting product to (“x”) although this might work it is considered bad practice because the parentheses don’t add any value to the context.

product = “x”
This would be a valid representation of what you are probably trying to accomplish.