📜  python 从字符串中删除重复的单词 - Python 代码示例

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

代码示例1
def unique_list(l):
    ulist = []
    [ulist.append(x) for x in l if x not in ulist]
    return ulist

a="calvin klein design dress calvin klein"
a=' '.join(unique_list(a.split()))