Jun-09-2020, 06:34 PM
Another way is to use list comprehension:
>>> lst_1 = [1, 2, 3, 4, 5, 6] >>> lst_2 = [1, 2, 5, 6] >>> lst_1 = [item for item in lst_1 if item not in lst_2] >>> lst_1 [3, 4]
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.