リストの作成
>>> list = ['a', 'b', 'c', 'a']
['a', 'b', 'c', 'a']
通常の重複排除
>>> set(list)
{'b', 'a', 'c'}
元の順番を保持した重複排除
>>> sorted(set(list), key=list.index)
['a', 'b', 'c']
Go to list of users who liked
More than 5 years have passed since last update.
リストの作成
>>> list = ['a', 'b', 'c', 'a']
['a', 'b', 'c', 'a']
通常の重複排除
>>> set(list)
{'b', 'a', 'c'}
元の順番を保持した重複排除
>>> sorted(set(list), key=list.index)
['a', 'b', 'c']
Register as a new user and use Qiita more conveniently
Go to list of users who liked