I was doing a code for a basic game and wondered if someone could help me figure out how to format the input.
import random
choice = str(input("1)Rock \n2)Paper\n3)Scissors\n4)Lizard\n5)Spock\nChoice: "))
computer_choice = random.randrange(5)
outcome = " "
if choice == "rock" and computer_choice == 1:
outcome = "Tie"
Let's say someone was to put Rock instead of rock, or rOCk instead of rock; what can I use do so that the computer will interpret all these strings as the same. Another quick question, say someone was to input
" RocK"
Into the input, what could I use to interpret the statement with this many spaces?