test = 'User Key Account Department Account Start Date'
I want to remove duplicate words from strings. The solution from this question functions well...
def unique_list(l):
ulist = []
[ulist.append(x) for x in l if x not in ulist]
return ulist
test = ' '.join(unique_list(test.split()))
But it only keeps the subsequent duplicates. I want to remove the first occurrence within the string such that the test string reads "User Key Department Account Start Date".