PYTHON: TypeError: bad operand type for unary +: 'str'
Hi guys, I am trying to make a text-based game in python where Player_1 decides what is in his sandwich and Player_2 must guess what is in the sandwich. However whenever I run the programme I get this error. Any ideas? Traceback (most recent call last): File "./Playground/file0.py", line 5, in <module> Guess=input(Player_2,+"guess what is in the sandwich") TypeError: bad operand type for unary +: 'str' This is my code... Player_1=input("Player_1, what is your name?: \n") Player_2=input("Player_2, what is your name?: \n") print("Welcome"+" "+Player_1+" "+Player_2) Ingredients=input(Player_1+","+" "+"what is in your sandwich?") Guess=input(Player_2,+"guess what is in the sandwich") if Guess==Ingredients: print("Correct"+" "+Player_2+"well done!") else: print("Incorrect!") Thanks for your time!