Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.)
- break
- print 'A', f
- else:
- print 'A fine selection of fruits!'
Add Comment
Please, Sign In to add comment