Skip to content

Instantly share code, notes, and snippets.

@wwgist
Created March 7, 2013 11:05
Show Gist options
  • Save wwgist/5107310 to your computer and use it in GitHub Desktop.
Save wwgist/5107310 to your computer and use it in GitHub Desktop.
PYTHON: from list > index+item pairs
# list = ['a', 'b', 'c', 'd', 'e']
for index, item in enumerate(list):
print index, item
# печатает "0 a 1 b 2 c 3 d 4 e"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment