This is a problem that can be solved by printing interim values and watching what happens. I'll leave that with you for the time and we can revisit the question when you've given this a try.
Now for something right off the wall, but that will take advantage of
y = x[:] # clone the list
for n in y: # iterate over the clone
while n in x: # loop through and remove all of `n`
x.append(n) # append a single value of `n`
This is a rather weird solution, so you won't see it very often, if at all. Study it, though, and see if you don't gain some insight parallel to your own.