I can't get a simple if statement to work. When a user inputs a number, the input function generates a string. I want to turn that string into an integer using the Int function. That works.
But the int function is turning anything inputted by the user, including words like Wizard, into an integer, too. The if statement is supposed to stop that by only having the numbers changed to integers. But it's not working.
Any issues that you can see with the code? Thanks.
char_choice = (input("Enter a number or name of character: "))
if char_choice == "1" or "2" or "3":
char_choice = int(char_choice)
print(char_choice)
print(type(char_choice))
ValueError: invalid literal for int() with base 10: 'Wizard'
P.S. I know there's an easier way to do this but I'm really curious why the if statement isn't working the way it should.