Discussion about this post

User's avatar
Timothy Grant's avatar

This was excellent thank you. I have often used sets to dedupe, but never used a dictionary to.

Great tip!

Expand full comment
B Sha's avatar
5hEdited

Hi Stephen, we can create a new empty list and iterate on first list which has non-unique values and check if an item is not in second list - if so append the item to second list. This approach also seems to maintain the order of the first list and creates unique values.

Expand full comment
1 more comment...

No posts