You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 17, 2023. It is now read-only.
#Write a function that uses a for loop to create a list of 5 grocery items. Ask the user to type in a grocery item and indicate whether that item is in the list.
groceryList = []
#loop def
def loop():
for i in range (5):
item = input("Enter a grocery item: ")
groceryList.append(item)
loop()
searchItem = input("Enter an item to search for: ")