Skip to content

Instantly share code, notes, and snippets.

@samarthbhargav
Created June 30, 2014 11:11
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 samarthbhargav/bbd9200b83e9ac3f3704 to your computer and use it in GitHub Desktop.
Save samarthbhargav/bbd9200b83e9ac3f3704 to your computer and use it in GitHub Desktop.
class MyList(list):
def find(self, element):
if element in self:
return self.index(element)
else:
return -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment