0

for the life of me I cannot find a way to remove case sensitivity from my "while" loop here is my code, how do I make so that "Visual Studio Code", "word" and "notepad" when entered are not case sensitive

vastaus = "Visual Studio Code"
alt_vastaus = "word" or "notepad"


while True:
    hommeli = input("Editori:")
    if hommeli == vastaus:
         break
    elif hommeli != vastaus or alt_vastaus:
        print("ei ole hyvä")
    elif hommeli == alt_vastaus:
        print("surkea")
  • 1
    what about `hommeli = input("Editori:").lower()` to just convert the string to lower case. Then set all your other variable strings to lower case – Chris Doyle Nov 21 '21 at 22:00
  • 1
    `alt_vastaus = "word" or "notepad"` this is always "word" – aberkb Nov 21 '21 at 22:01

0 Answers0