Tamas4

test

Nov 21st, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. fruits = ['banana', 'apple', 'orange', 'tomato', 'pear', 'grape']
  2.  
  3. print 'You have...'
  4. for f in fruits:
  5.   if f == 'tomato':
  6.     print 'A tomato is not a fruit!' # (It actually is.)
  7.     break
  8.   print 'A', f
  9. else:
  10.   print 'A fine selection of fruits!'
Add Comment
Please, Sign In to add comment