title: Getting complement of a character
body: <p>How can't the codes below work, in order to get the complement of the character entered? It seems like the loop never end, but let say, if I enter 'Z' as dna, why wouldn't it break and quit? Did I use the break or if wrongly? How about elif?</p>
  
  <p>def get_complement(dna):</p>
  
  <pre><code>''' (ch) -&gt; ch
  
  Reverse the 'A' to 'T' or vice versa and 'C' to 'G' and vice versa too.
  &gt;&gt;&gt; get_complement('A')
  'C'
  &gt;&gt;&gt; get_complement('G')
  'T'
  
  '''
  if dna == 'A':
      print ('C')
      if dna == 'C':
          print ('A')
          if dna == 'T':
              print ('G')
              if dna == 'G' :
                  print ('T')
                  while  {'A', 'C', 'G', 'T'}.isnotsubset(set(dna)) :
                      break
                  return ('')
  </code></pre>