I have a 2d list with more than 20 rows but Im having a bit of trouble trying to figure out how to remove duplicates from each sublist in a list without changing the remaining order of unique items in each sub list. Example below,
list1 = [['a', 'a', 'b', 'b', 'b', 'v', 'v', 'v', 'v', 'x', 'x', 'p'],
['b', 'c', 'd', 'c'], ['a', 'j', 'j', 'j', 'c', 'c', 'f', 'f', 'h', 'h', 'h', 'h']]
I would like the output to be like this:
Output = [['a', 'b', 'v', 'x', 'p'], ['b', 'c', 'd'], ['a', 'j', 'c', 'f', 'h']]