Skip to content

Instantly share code, notes, and snippets.

@rnaeye
Created October 10, 2016 20:14
Show Gist options
  • Save rnaeye/60fefbe00cd88b5dd98f1ed70344f15f to your computer and use it in GitHub Desktop.
Save rnaeye/60fefbe00cd88b5dd98f1ed70344f15f 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]
common = []
for item in a:
if item in b:
if item not in common:
common.append(item)
print common
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment