This compares the values in both lists for common numbers.
a = [1, 2, 2, ]
b = [1, 2, 3, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12]
c = a + b
new = []
for i in c:
if i not in new:
new.append(i)
print(new)
Why is new = []
necessary? Is there no way to figure this out with just c
?