title: Pythonic way to replace chars
body: <p>I want to replace some characters in a string using a pythonic approach.</p>
  
  <pre><code>A -&gt; T
  C -&gt; G
  G -&gt; C
  T -&gt; A
  </code></pre>
  
  <p>Example:</p>
  
  <blockquote>
    <p>AAATCGATTGAT</p>
  </blockquote>
  
  <p>will transform into</p>
  
  <blockquote>
    <p>TTTAGCTAACTA</p>
  </blockquote>
  
  <p>What I did:</p>
  
  <pre><code>def swap(string):
      string = re.sub('A', 'aux', string)
      string = re.sub('T', 'A', string)
      string = re.sub('aux', 'T', string)
      string = re.sub('C', 'aux', string)
      string = re.sub('G', 'C', string)
      string = re.sub('aux', 'G', string)
  
      return string
  </code></pre>
  
  <p>It worked great, but i'm looking for a more pythonic way to reach that.</p>