I am trying to remove the duplicates from a list. First tried to do so by comparing the elements of 2 lists but i am no satisfied with this method. Is there an easier way?
list1 = [a, b, b, c, c, d,]
list2 = [b, c]
for list1 in list2:
list.append(list.remove())
return list
But this way i remove all of the members that are in list1 and list2 and i want to remove only the duplicates.