📅  最后修改于: 2022-03-11 14:46:51.328000             🧑  作者: Mango
#Update: As of Python 3.7 (and CPython 3.6), standard dict is
#guaranteed to preserve order and is more performant than OrderedDict.
#(For backward compatibility and especially readability,
#however, you may wish to continue using OrderedDict.)
>>> keywords = ['foo', 'bar', 'bar', 'foo', 'baz', 'foo']
>>> list(dict.fromkeys(keywords))
['foo', 'bar', 'baz']