0
Help!
I'm trying to make a code that has several string elements in a list, that when a person inputs in all caps, it asks them to not do that. Why is this code not working? It says my list has too many arguments? But I only have one list in the parenthesis. answers = list('Yes', 'No', 'Maybe') user = input(str('YES')) if str('ES', 'O', 'AYBE') in user: print('PLEASE DONT YELL AT ME')
2 Réponses
+ 1
Assingn a singal argument inside ( ).
Define a var (let's say demand) and get it value = value input by user.
0
Why don't you use isupper to check if a word is All caps like this
str = input()
if str.isupper():
print('do not yell at me')