How can I find which position on a list an input is, without using 'if' statements? My current code is below. I want to remove the if statements, so that when a breed is inputted, the computer outputs "Great choice!" then separately outputs the price, in as compact code as possible. I need something which finds which value on a list an input is, the prints the corresponding position from ANOTHER list.
dog_breed_list = ["daschund", "chihuahua", "French boxer", "Jack Russell",
"poodle"]
dog_price_list = [350, 640, 530, 400, 370]
dog_choice = input("Welcome to the Pet Shop. \nWhich is your breed choice?")
if dog_choice == dog_breed_list[0]:
print("Great choice! This breed costs £350.")
elif dog_choice == dog_breed_list[1]:
print("Great choice! This breed costs £640.")
elif dog_choice == dog_breed_list[2]:
print("Great choice! This breed costs £530.")
elif dog_choice == dog_breed_list[3]:
print("Great choice! This breed costs £400.")