I'm trying to call a function that I defined in the code, however, it's saying that it's not defined? The error is where I have "add_to()" it's saying it's not defined. What am I doing wrong here?
grocery_list = ['salmon', 'beef', 'eggs', 'milk']
print(grocery_list)
question = input("Would you like to add anything to the list?: ")
if question == "yes" or "y" or "Y":
add_to()
else:
print("Enjoy your shopping")
def add_to():
input("Please enter the item you'd like to add: ")
grocery_list.append(str(input))
print(grocery_list)
add_toat the top.