I have got the following code from here:
def unique_list(l):
ulist = []
[ulist.append(x) for x in l if x not in ulist]
return ulist
a="testtest"
a=' '.join(unique_list(a.split()))
print(a)
Now I am trying unsuccessfully to rewrite it, so that it also work on strings without spaces like e.g. "testtest".
expected output: test