I have a list of lists in Python:
k = [[1, 2], [4], [5, 6, 2], [1, 2], [3], [4]]
And I want to remove duplicate elements from it. Was if it
A bit of a background, I just started with python and learnt comprehensions.
k = [[1, 2], [4], [5, 6, 2], [1, 2], [3], [4]] dedup = [elem.split('.') for elem in set(['.'.join(str(int_elem) for int_elem in _list) for _list in k])]