Skip to content

Instantly share code, notes, and snippets.

@poros
Created October 4, 2015 13:04
Show Gist options
  • Save poros/6b90f659be68925694f4 to your computer and use it in GitHub Desktop.
Save poros/6b90f659be68925694f4 to your computer and use it in GitHub Desktop.
Find index of an item in a list
for i, c in enumerate(shuffled_numbers):
if x == 2:
return i
shuffled_numbers.index(2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment