Little problem with the "+" operator

Raymond Hettinger othello at javanet.com
Mon Mar 5 09:49:00 EST 2001


Zamurai wrote:

> I want to make the following:
>
> variableOne = 500
> myVariable = variableOne + "cool"
>
> But I get the following error: "unsupported operand types for +"
>
> Does someone know how to solve the problem?

Try:
myVariable = str(variableOne) + "cool"






More information about the Python-list mailing list