What I am trying to do is make it so the user enters a name, which the program then takes that, adds the word Move
to it and then grabs a set named as *name*Move
.
Here is my code thus far, with what I want to do within **
:
fredMove = set(["move1","move2","move3","move4"]) #different data
joeMove = set(["move","move","move3","move4"]) #for each name
chrisMove = set(["move1","move2","move3","move4"]) #this is just
timMove = set(["move1","move2","move3","move4"]) #easier to write out
#I have many more lists, as well
name = input("What is the name you are looking for? ").lower
def moveChecking(move1,move2,move3,move4,name):
if (move1 not in *name*Moves):
print("Move 1 not found!")
if (move2 not in *name*Moves):
print("Move 2 not found!")
if (move3 not in *name*Moves):
print("Move 3 not found!")
if (move4 not in *name*Moves):
print("Move 4 not found!")
move1 = input("Enter move 1 = ")
move2 = input("Enter move 2 = ")
move3 = input("Enter move 3 = ")
move4 = input("Enter move 4 = ")
moveChecking(move1,move2,move3,move4,name)
Any way to do what I want in a way that lets me avoid creating moveChecking()
for every person's name?