Skip to content

Instantly share code, notes, and snippets.

@blanc0
Forked from kennethreitz/python
Created June 13, 2011 22:34
Show Gist options
  • Save blanc0/1023902 to your computer and use it in GitHub Desktop.
Save blanc0/1023902 to your computer and use it in GitHub Desktop.
def contains(k,l):
for x in l:
if k in ((x[0],x[1]), (x[1],x[0]))
return True
return False
:::
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment