Skip to content

Instantly share code, notes, and snippets.

@GitMoIO
Created October 4, 2015 23:20
Show Gist options
  • Save GitMoIO/5c2d2c391550e00d5af6 to your computer and use it in GitHub Desktop.
Save GitMoIO/5c2d2c391550e00d5af6 to your computer and use it in GitHub Desktop.
>>> def print_everything(*args):
for count, thing in enumerate(args):
... print '{0}. {1}'.format(count, thing)
...
>>> print_everything('apple', 'banana', 'cabbage')
0. apple
1. banana
2. cabbage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment