Python Forum

Full Version: Unexpected input in While Loop
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys, I'm trying to learn how to do while loops and came across a problem. No errors show up in my code but when I run it, it doesn't ask the input in my while loop. It would be awesome if someone could help me figure this out. [python]
valid = {'1', '2', '3'}
while False:
advantage = input("Do you pick extra health [1], extra luck [2], or extra power [3[").strip()
if advantage in valid:
print("Your stats have been updated")
else:
print("Invalid input, try again")
break
[python]

Thank you for your consideration
The you debug it

valid = {'1', '2', '3'}
print("before while")
while False:
    print("in while")