Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created September 29, 2016 03:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/670dc2c725f018b67ba9a1028407da41 to your computer and use it in GitHub Desktop.
Save codecademydev/670dc2c725f018b67ba9a1028407da41 to your computer and use it in GitHub Desktop.
Codecademy export
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
else:
print 'A fine selection of fruits!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment