result = []
duplicate_items = []
for nested in IN[0]:
unique = []
for item in nested:
if item not in duplicate_items:
unique.append(item)
duplicate_items.append(item)
result.append(unique)
OUT = result
Hi guys!
now, i’m trying for do some thing like that: I have a list with sublists of elements. I want to remove duplicates in sublists with the structure should be preserved.
How can I do it please?
Welcome to the forum. Do you mean the structure in the sublist?
Do you want to remove the duplicated values or do you want to replace it with for example a null?