Created
October 19, 2017 19:09
-
-
Save bondnotanymore/b58ba43fbb0f1b30ece3ebca8b6126ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
my solution