Professional Documents
Culture Documents
10G
10G
Python:
myList = [27,19,36,42,16,89,21,16,55]
item = int(input("Please enter item to be found"))
found = false
for i in range(len(myList)):
if myList[i] == item:
found = true
itemIndex = i
break
if found:
print("Item found, index " + itemIndex)
else:
print("Item not found")