Jun-14-2019, 04:24 PM
Also from 3.6 and guaranteed in 3.7 so are dictionaries ordered.
This mean that can drop import of OrderedDict,and just use
This mean that can drop import of OrderedDict,and just use
dict()
.>>> numbers = [3, 3, 20, 6, 10, 6, 5, 5, 7, 10, 7, 19, 19, 20] >>> list(dict.fromkeys(numbers)) [3, 20, 6, 10, 5, 7, 19]