Here's my code for the exercise:
fruits = ['banana', 'apple', 'orange', 'tomato', 'pear', 'grape'] print 'You have...' for f in fruits: if f == 'a' or 'e' or 'i' or 'o' or 'u': print 'An', f else: print 'A', f else: print 'A fine selection of fruits!'
The output on the console is the following:
A fine selection of fruits!
I don't understand why the fruits which don't begin with a vowel get printed with the article "an" in front of them, whereas my code suggests that only fruits which begin with a vowel should have "an" in front of them in the output.
Any sort of help is appreciated. Thanks.