title: Python, replace long dash with short dash?
body: <p>I want to replace a long dash (<code>–</code>) with a short dash (<code>-</code>). My code:</p>
  
  <pre><code>if " – " in string:
        string = string.replace(" – ", " - ")
  </code></pre>
  
  <p>results in the following error:</p>
  
  <blockquote>
    <p>SyntaxError: Non-ASCII character '\xe2' in file ./script.py on line 76, but no encoding declared; see <a href="http://www.python.org/peps/pep-0263.html" rel="noreferrer">http://www.python.org/peps/pep-0263.html</a> for details</p>
  </blockquote>
  
  <p>How can I fix this?</p>