Oct-11-2018, 12:50 AM
i want to merge several (large) lists and remove duplicates. a set seems useful because all items are strings that can be saved in a set. but i also want to retain order an run on older versions of python. still, it seems not that hard (copy items while checking a set for dupes). but, before i code that, i am wondering if python has such a thing, already. it would seem silly to code it if it is already existing. yet, i am not good at finding builtin functions in the docs.
i know that dictionaries in 3.7 maintain the order added. but this code will need to be able to run in earlier versions, too.
i'm curious about that feature of dictionaries in 3.7. do sets have the same feature? and if so, is that order carried along when making s frozen set from a set or list or tuplr?
i know that dictionaries in 3.7 maintain the order added. but this code will need to be able to run in earlier versions, too.
i'm curious about that feature of dictionaries in 3.7. do sets have the same feature? and if so, is that order carried along when making s frozen set from a set or list or tuplr?