def linearSearch(myitem,mylist):
found = False
position = 0
while position < len(mylist) and not found:
if mylist[position] == myitem:
found = True
position = position + 1
return found
if __name__=="__main__":
shopping = ["apples","bananas","chocolate","pasta"]
item = input("what item do you wanna find? ")
isitFound = linearSearch(item, shopping)
if isitFound:
print ("Your item is in the list")
else:
print ("item not in list")