0
How to specify list for user input?
gilshtainFamilyNames = ["Adiel", "Liam", "Liza", "Nikolas", "Luba", "Slavic", "Euri", "Olga", "Natalie", "Viktor"] anyName = input("Hello, what is your name?") if anyName == gilshtainFamilyNames[0,9]: print("\n\n Hello " + anyName) What I want to do is, if I type any of the names which are in the list of "gilshtainFamilyNames" into the input, it will output "Hello <name in the list>". But it keeps giving me a TypeError, why?
4 Respuestas