python append (+=) replaces entire string with last char
<p>I wrote a simple script to print out the unique characters in a given string. </p>

<p>Each unique character is appended to output, however at the end, only the last character appended is printed.</p>

<pre><code>input = "1234a4321b1234c4321d" 

output= ""

for x in input:
    if x not in output:
        output += x

print x
</code></pre>

<p>I expect this to print: 1234abcd</p>

<p>but it only prints is: d</p>

<p>What am I doing wrong? </p>
