Sep-08-2022, 11:55 AM
Agree with Lars that dictionary is more the way to go. Here is a version without error checking but otherwise works.
cars = { 'audi':"you picked Audi", 'volkswagon':"you picked volkswagon", 'volvo':"you picked volvo" } while True: choice = input('Enter chosen model ').lower() if choice == "exit": break print(cars[choice])