I know how to use both for loops and if statements on separate lines, such as:
>>> a = [2,3,4,5,6,7,8,9,0] ... xyz = [0,12,4,6,242,7,9] ... for x in
A simple way to find unique common elements of lists a and b:
a = [1,2,3] b = [3,6,2] for both in set(a) & set(b): print(both)