list1 = [1,2,3,4,5,6,7,8,9]
list2 = [10,11,12,13,5,7]
and now i want that list2 should be cutted for same elements in list1 and list2
--> list2 = [10, 11, 12, 13]
5 and 7 is deleted because they are also in list1.
this is what i tried:
for i in range(len(list1)):
test = list1[i]
if test in list2:
del list2[list1[i]]
print(list2)
but list2 is the same as before :-(
hope you can help me EDIT: Sorry i forgot to say that the lists have got dates in datetime type. does it still work ?