I am seeking assistance on properly using the following 3 while loops:
while choice is None: ...
while not isinstance (choice, int): ...
while int(choice) not in range(0,1): ...
Something like this perhaps:
while choice is None and not isinstance (choice, int) and int(choice) not in range(0,1):
print("Invalid option!")
choice = input("Choose key: ")
How would I properly nest this?
choice = None
choice = input("Choose key: ")
while choice is None:
choice = input("Choose key: ")
while not isinstance (choice, int):
print("choice is an integer and I equal 0 or 1")
print("Also if I am None or not an int, I will loop until I meet I am")
while int(choice) not in range(0,1):
choice = input("Choose key: ")
choice = int(choice)