📜  从列表中获取唯一值 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:32.131000             🧑  作者: Mango

代码示例1
mylist = ['nowplaying', 'PBS', 'PBS', 'nowplaying', 'job', 'debate', 'thenandnow']
myset = set(mylist)
print(myset)
mynewlist = list(myset)
#['nowplaying', 'PBS', 'job', 'debate', 'thenandnow']