How can i do a while loop to incorporate ValueError and input not in list.
def region():
print("What is the Region?")
print("1: Central")
print("2: North")
print("3: North-East")
print("4: East")
print("5: West")
region = int(input("Region: "))
while region not in [1,2,3,4,5]:
print("Invalid Response. Please choose the correct region.")
print("Please choose again!")
region = int(input("Region: "))
this code will keep looping if input is not within the list of options but if i were to input characters or symbols it will raise ValueError.