I have two lists
first = ['-6.50', '-7.00', '-6.00', '-7.50', '-5.50', '-4.50', '-4.00', '-5.00']
second = ['-7.50', '-4.50', '-4.00']
I want to shorten first
by every element that occur in second
list.
for i in first:
for j in second:
if i == j:
first.remove(i)
Don't know why this did not remove the -4.00
['-6.50', '-7.00', '-6.00', '-5.50', '-4.00', '-5.00']
Any help appreciated :)