title: Avoid overlap when using replace
body: <p>I'm playing around with a simple crypting program, and I want it to work so that every specific symbol, always will turn into another specific symbol. That might not be the best description, but I don't know how else to put it... For an example: </p>
  
  <p>"a" is going to be "h"</p>
  
  <p>"A" is going to be "k"</p>
  
  <p>"h" is going to be "W"</p>
  
  <pre><code>text_1 = "aAh"
  
  text_2 = text_1.replace('a', 'h')
  text_3 = text_2.replace('A', 'K')
  text_4 = text_3.replace('h', 'W')
  
  print text_4
  
  #the output is "WKW"
  #I need the output to be "hKW"
  </code></pre>
  
  <p>The problem is, that I'm using the replace-command for every single symbol-replacement, so if we suppose that the codes are typed in the same order as our example, and the message I want to crypt is "aAh", then I would like the crypted output to be "hKW" but actually we get this output instead "WKW".</p>
  
  <p>I know why this is happening, so my question is: </p>
  
  <p>How do I get the program to crypt the message the way I intended it to do?</p>