Skip to content Skip to sidebar Skip to footer

Python Type Error Unsupported Operand

I have a sample program here that is returning the following error when I run it and select an option but I don't see the problem. TypeError: unsupported operand type(s) for -: 's

Solution 1:

If you use Python3 then input(question) returns string '1', '2', etc. You have to convert it into number int(input(question)).


Post a Comment for "Python Type Error Unsupported Operand"