Created
March 7, 2013 11:05
-
-
Save wwgist/5107310 to your computer and use it in GitHub Desktop.
PYTHON: from list > index+item pairs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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