Please note, similar question to this particular one is Not present here already. But different ones present. So posting the question for suggestions.
Its for removing the Duplicates from Individual List item from the Nested List and preserving the order.
Please see below question for more details and suggest.
list_1 = [['A1', 'B1', 'A1'],
['A2', 'B2', 'B2'],
['A3', 'B3', 'C3']]
First item in list_1 has 2 'A1's and Second item has 2 'B2's and no dupes in Third item. So need to eliminate the dupes from First & Second items and also order needs to be preserved.
Expected output list as below:
list_op = [['A1', 'B1'],
['A2', 'B2'],
['A3', 'B3', 'C3']]
Note: Below solution is removing the Dupes as required from Nested List, but Not preserving the order within Individual List items, after dupes removal.
[list(set(sub_list)) for sub_list in list_1]