# [] create list-o-matic
# [] create list-o-matic
fish_list = ["salmon", "cod", "puffer"]
print("Look at my list of fish: " + str(fish_list))
def list_o_matic():
while fish_list:
new_fish = input("Enter any type of fish or Q to quit: ")
if new_fish.upper() == "Q":
print("Goodbye, and thanks for all the fish!")
break
elif new_fish == "":
new_fish = fish_list.pop()
print(new_fish.lower() + " popped from list")
print (fish_list)
elif new_fish.lower() in fish_list:
print(new_fish.lower() + " has been removed from list")
print (fish_list)
elif new_fish not in fish_list:
print("1 instance of " + new_fish.lower() + " appended to list")
fish_list.append(new_fish)
print (fish_list)
else:
print("Look at my list of fish: " + str(fish_list))
list_o_matic(new_fish)
print(fish_list)
print("I have no fish. Goodbye!")
list_o_matic()