Sorry for the poorly worded title but I asked a question earlier about getting a unique list of items from two lists. People told me to make the list -> sets and then union.
So now I’m wondering if it’s faster to:
- While adding one item to a list, scan the whole list for duplicates.
- Make that one item a set and then union sets.
I should probably just read up on sets in hindsight…
In Python, by the way – sorry for not clarifying.
as you can see extending one list by another end then remove duplicates by making set
is the fastest way(at least in python;))