I got a list of lists and don’t know how to filter out duplicates (to a new list).
I tried extracting a path list and succesfully filtered out the duplicates,
dup_pathlist = pathA, pathA, pathC, pathC
but I couldn’t recover the original connection between node and dupl_pathlist items. 🙁
I start with this:
node_path_list = [['node1', 'pathA'], ['node2', 'pathA'], ['node3', 'pathB'], ['node4', 'pathC'], ['node5', 'pathC']]
want to end here:
result = [['node1', 'pathA'], ['node2', 'pathA'],['node4', 'pathC'], ['node5', 'pathC']]
EDIT: this should work better!