numbers = [4, 8, 15, 16, 23, 42]
searchItem = 16
for i in range(len(numbers)):
if numbers[i] == searchItem:
print(i)
16 2 3 4 resort = ['Margate', 'Swansea', 'Brighton', 'St Ives', 'Cromer']
townName = 'Brighton'
found = False
i = 0
while not found and i < len(resort):
if townName == resort[i]:
found = True
i = i + 1
2 4 5 3 You can still revise this topic