title: scan through a list with dictionary in python
body: <p>Hi i have been trying this for some time now no result yet. 
  i have a <code>dict = {'Å':'a', 'Ä':'a', 'Ö':'0', 'å':'a', 'ä':'a', 'ö':'o'}</code> </p>
  
  <pre><code> input = lxml.etree.parse(inputxml)
   for block in input.xpath('//PAGE/BLOCK/TEXT'):
      J = block.xpath('TOKEN/text()')
      current = 0
      line = ""
      while current &lt; len(J):
          A = J[current]
          current += 1
  </code></pre>
  
  <p>i need to scan A with the dict and find the non-english letters and replace it with english letter</p>
  
  <pre><code>   for i in A:
          if(dict.has_key(i)):
                ReplaceWord= A.replace(i,dict[i])
  </code></pre>
  
  <p>but this is not working </p>