Skip to content

Instantly share code, notes, and snippets.

@bondnotanymore
Created October 19, 2017 19:09
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 bondnotanymore/b58ba43fbb0f1b30ece3ebca8b6126ae to your computer and use it in GitHub Desktop.
Save bondnotanymore/b58ba43fbb0f1b30ece3ebca8b6126ae to your computer and use it in GitHub Desktop.
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
a = list(set(a))
b = list(set(b))
def common_element():
return [x for x in a for y in b if x == y]
print common_element()
@bondnotanymore
Copy link
Author

my solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment