I tried running a block of code and got the above error for this line of code:
print("Congratulations! You swapped out a", box3, "for", + str( randomPersuade2 ) + " Dollars. Enjoy!")
box3 holds a value from a list of items
box1,box2,box3,box4, box5 = ["Car", "TV", "DVD", "Overseas Holiday", "Box of chocolates"]
randomPersuade2 is a variable that holds a value from a random.randint() funct.
randomPersuade2 = random.randint(200,5000)
As mentioned in the title, I get the error
TypeError: bad operand type for unary +: 'str'
How would I resolve this? Any help would be much appreciated!
+before thestr()call? - tkausl