从 python 列表中获取唯一值

['nowplaying', 'PBS', 'PBS', 'nowplaying', 'job', 'debate', 'thenandnow']
['nowplaying', 'PBS', 'job', 'debate', 'thenandnow']
output = []
for x in trends:
    if x not in output:
        output.append(x)
print(output)

答案