The code below gives an infinite loop even when I type in y or n. How do I fix it? /u/Rifted-06 Python Education
The code below gives an infinite loop even when I type in y or n. How do I fix it? /u/Rifted-06 Python Education
choice = input("Do you want to generate another password? Answer y/n: ") while choice != "y" or choice != "n": choice = input("Invalid response. Answer y/n: ")
submitted by /u/Rifted-06
[link] [comments]
r/learnpython choice = input(“Do you want to generate another password? Answer y/n: “) while choice != “y” or choice != “n”: choice = input(“Invalid response. Answer y/n: “) submitted by /u/Rifted-06 [link] [comments]
choice = input("Do you want to generate another password? Answer y/n: ") while choice != "y" or choice != "n": choice = input("Invalid response. Answer y/n: ")
submitted by /u/Rifted-06
[link] [comments] choice = input(“Do you want to generate another password? Answer y/n: “) while choice != “y” or choice != “n”: choice = input(“Invalid response. Answer y/n: “) submitted by /u/Rifted-06 [link] [comments]