From two lists, return a list that contains only the elements that are common between the 2 imput lists. Without duplicates.
Imput:
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]
My solution:
common_list = [i for i in a if i in b]
My output:
[1, 1, 2, 3, 5, 8, 13]
Output i need:
[1, 2, 3, 5, 8, 13]