title: Not able to remove characters from a string in Python
body: <p>I am trying to loop through a string <code>x</code> that represents the alphabet and at the same time compare those values with a list that contains some specific letters.</p>
  
  <p>If there is a match in both the list and the string <code>x</code>, it should remove the specific character from the string <code>x</code>. It is a very simple and straightforward piece of code. I've followed the <code>.replace</code> method to the T. However, when I ran the code, the string <code>x</code> still shows up in its original state.</p>
  
  <p>Here is my working code:</p>
  
  <pre><code>lettersGuessed = ['e', 'i', 'k', 'p', 'r', 's']
  
  x = 'abcdefghijklmnopqrstuvwxyz'
  
  for i in range(len(x)):
      if x[i] in lettersGuessed:
          x.replace(x[i],'')
  
  print x  "Available Letters"
  </code></pre>