Skip to content

Instantly share code, notes, and snippets.

@kennethreitz
Created November 7, 2010 10:38
Show Gist options
  • Save kennethreitz/666054 to your computer and use it in GitHub Desktop.
Save kennethreitz/666054 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