I want to remove every item in b that's in a, the out would be [7,8,9,0], how can I do it, this doesn't seem to work
In [21]:
a=[1,2,3,4,5]
b=[1,2,3,5,5,5,7,8,9,0]
for i in b:
if i in a:
print i
b.remove(i)
print b
#
Out[21]:
1
3
5
[2, 5, 5, 7, 8, 9, 0]