title: Python: Best Way to remove duplicate character from string
body: <p>How can I remove duplicate characters from a string using Python? For example, let's say I have a string:</p>
  
  <pre><code>foo = "SSYYNNOOPPSSIISS"
  </code></pre>
  
  <p>How can I make the string:</p>
  
  <pre><code>foo = SYNOPSIS
  </code></pre>
  
  <p>I'm new to python and What I have tired and it's working. I knew there is smart and best way to do this.. and only experience can show this.. </p>
  
  <pre><code>def RemoveDupliChar(Word):
          NewWord = " "
          index = 0
          for char in Word:
                  if char != NewWord[index]:
                          NewWord += char
                          index += 1
          print(NewWord.strip()) 
  </code></pre>
  
  <p>NOTE: Order is important and this question is not similar to <a href="https://stackoverflow.com/questions/9841303/best-way-to-remove-duplicate-characters-from-a-string">this</a> one.</p>