title: Replace special characters in a string in Python
body: <p>I am using urllib to get a string of html from a website and need to put each word in the html document into a list.</p>
  
  <p>Here is the code I have so far. I keep getting an error. I have also copied the error below.</p>
  
  <pre><code>import urllib.request
  
  url = input("Please enter a URL: ")
  
  z=urllib.request.urlopen(url)
  z=str(z.read())
  removeSpecialChars = str.replace("!@#$%^&amp;*()[]{};:,./&lt;&gt;?\|`~-=_+", " ")
  
  words = removeSpecialChars.split()
  
  print ("Words list: ", words[0:20])
  </code></pre>
  
  <p>Here is the error.</p>
  
  <pre><code>Please enter a URL: http://simleyfootball.com
  Traceback (most recent call last):
    File "C:\Users\jeremy.KLUG\My Documents\LiClipse Workspace\Python Project 2\Module2.py", line 7, in &lt;module&gt;
      removeSpecialChars = str.replace("!@#$%^&amp;*()[]{};:,./&lt;&gt;?\|`~-=_+", " ")
  TypeError: replace() takes at least 2 arguments (1 given)
  </code></pre>