title: How to create a function that looks at individual letters in a string?
body: <p>I am trying to make a function that will take in DNA strings and then complement them out (i.e. if A, give T and if G, give C [vice versa]).</p>
  
  <p>So far I have this code:</p>
  
  <pre><code>def Complement(DNA):
      DNA = input("Enter your DNA string:")
      if DNA == 'A':
          result = 'T'
      elif DNA == 'T':
          result = 'A'
      elif DNA == 'G':
          result = 'C'
      else:
          result = 'G'
      return (result)
  </code></pre>
  
  <p>But, python is picking up the 4 'digit' string as an 'else' and results in G as output. How can I alter this code so that anyone can enter a random letter/size DNA string and the function will complement each letter?
  This code works if you have just one letter in the DNA string which isn't really helpful :/</p>
  
  <p>THANKS</p>