title: how do I print Ä, Ö, Ü in python
body: <p>Im writing a Crawler in Python and when I crawl german pages and write it into a txt file it doesnt write "Ö", "Ä" or "Ü", but \xD6, \xF6, ... instead</p>
  
  <p>Any ideas how to fix that?</p>
  
  <pre><code>        ortschaften = list()
      text_file = open("Output_Brandenburg.txt", "w")
      for x in xrange(1,99):
          ortschaft = str(response.xpath('//*[@id="orte"]/div[1]/ul/li[' + str(x) + ']/a/text()').extract())
  
          ortschaft.replace("\xD6", "Oe")
          ortschaft.replace("\xF6", "oe")
  
          ortschaft.replace("\xAE", "Ae")
          ortschaft.replace("\xE4", "ae")
  
          ortschaft.replace("\xDC", "Ue")
          ortschaft.replace("\xFC", "ue")
  
          print ortschaft
          text_file.write(ortschaft + "\n")
          if ortschaft is not None:
              ortschaften.append(ortschaft) 
              pass
  </code></pre>
  
  <p>My Output for Example:</p>
  
  <pre><code>[u'Altreetz']
  [u'Am Mellensee']
  [u'Angerm\xfcnde']
  [u'Annah\xfctte']
  [u'Arensdorf']
  [u'Bad Belzig']
  </code></pre>