I want my Python code to accept both uppercase and lowercase input.
I've tried casefold, but with no luck. Any help?
advice =""
while advice !=("Yes"):
print("Would you like some advice!")
advice = input("Yes or No? ")
print("Always listen to your IT Teacher!")
I would like the input to accept Yes
and yes
as user input.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…