I'm trying to remove all duplicates from a python list, other than keywords that are stored in another list.
For example:
a = ['a','a','b','b','c','c']
keywords = ['a','b']
some_func(a,keywords) = ['a','a','b','b','c']
How could I do this in the most pythonic way possible?
This is one approach using a simple iteration.
Output: