I have a list of animals:
list_animals = ['dog', 'cat', 'cow', 'tiger', 'lion', 'snake', 'lion']
and a set of pets:
set_pets = set(['dog', 'cat'])
I want to remove pets in set_pets
from list_animals
but still keep the original orders of list_animals. Would this be possible?
I tried to do:
set(list_animals) - set_pets
, but then it doesn't keep the original animal orders ...
Thanks!