I'm trying to validate an input by using a list that holds the strings that are valid inputs but I can't seem to get it to work correctly, any help?
choice = ["A","a","B","b"]
def main():
test = input()
if validate(test):
print("Entered a")
else:
print("did not enter a")
def validate(val):
try:
val = choice.index[1]
except:
return False
else:
return True
main()