Skip to content

Instantly share code, notes, and snippets.

@adv27
Created September 16, 2019 05:12
Show Gist options
  • Save adv27/ff25ece0678e68e16a5f4fcb2deb7306 to your computer and use it in GitHub Desktop.
Save adv27/ff25ece0678e68e16a5f4fcb2deb7306 to your computer and use it in GitHub Desktop.
for i,a in enumerate(['cat', 'dog']):
print('{} is {}'.format(a, i))
# output:
# cat is 0
# dog is 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment