Code: Select all
list_of_some_Virginia_cities = list(("Virginia Beach", "Richmond", "Norfolk", "Norton", "Roanoke", "Bristol"))
try:
your_choice_of_Virginia_city = input("Name a city in Virginia.")
except ValueError:
return "Please pick a string value."
else:
if your_choice_of_Virginia_city in list_of_some_Virginia_cities:
print(f "Your choice is on the list")
else:
print(f "Your choice isn't on the list but might still be a Virginia city.")
