Skip to content

Instantly share code, notes, and snippets.

@infynyxx
Created February 21, 2010 10:08
Show Gist options
  • Save infynyxx/310241 to your computer and use it in GitHub Desktop.
Save infynyxx/310241 to your computer and use it in GitHub Desktop.
python enumeration
#this is more clearer than below code
for i,n in enumerate(x):
if x[i] < 0:
print "Found negative nunber @ index ", i
for i in range(len(x)):
if x[i] < 0:
print "Found negative nunber @ index ", i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment