I create a list so if someones inputs any item from the list it will print the same.
lista = ["example", "example2"]
listb = ["exampleb", "example2b"]
choice = input()
if choice == lista[]:
print("outputa")
elif choice == listb[]:
print("outputb")
if the user types either example or example2 it will print outputa but if the user types exampleb or example2b it will print outputb. Thanks
Aucun commentaire:
Enregistrer un commentaire