I am trying to do an assignment where it requires me to indicate that if there is a word that starts with a in the list, there must be a break and message indicating as such. This is what I have so far but not sure where to go from here or how to fix it.
mylist = ['bananas', 'grapes', 'pears', 'peaches', 'apples', 'plums', 'oranges']
result = [i for i in mylist if i.startswith('a')]
for letter in mylist:
if letter == 'a':
break
print("Found word starting with 'a'. Exiting loop.")