10 lines
257 B
Python
10 lines
257 B
Python
flavors = ["pistachio", "malaga", "vanilla", "chocolate", "strawberry"]
|
|
prompt = "Choose your flavor: "
|
|
|
|
print(flavors)
|
|
|
|
while (choice := input(prompt)) not in flavors:
|
|
print(f"Sorry, '{choice}' is not a valid option.")
|
|
|
|
print(f"You chose '{choice}'.")
|