Skip to content

Instantly share code, notes, and snippets.

@samuell
Created August 15, 2012 13:22
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 samuell/3360083 to your computer and use it in GitHub Desktop.
Save samuell/3360083 to your computer and use it in GitHub Desktop.
Loop over keys and values of an array in python
my_arr = ["ugh", "cough", "humm"]
for key, value in enumerate(my_arr):
print "%s : %s" % (key, value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment