Tomato shouldn't be here (18/14)


The code below...

fruits = ['banana', 'apple', 'orange', 'tomato', 'pear', 'grape']

print 'You have...'
for f in fruits:
    if f == 'tomato':
        print 'A tomato is not a fruit!' # (It actually is.)
    print 'A', f
    print 'A fine selection of fruits!'` this:

You have...
A banana
A apple
A orange
A tomato is not a fruit!
A tomato
A pear
A grape
A fine selection of fruits!

How to print "A tomato is not a fruit!" without "A tomato" ?


if condition then do something, else do something else