title: DNA to RNA Transcription code in Python 3.6 failing 'ACGTXXXCTTAA' test
body: <p>I am trying to solve DNA to RNA Transcription problem but my code is unable to pass this test case: <code>ACGTXXXCTTAA</code></p>
  
  <p>The transcription should be as follows:</p>
  
  <pre><code>G --&gt; C
  
  C --&gt; G
  
  T --&gt; A
  
  A --&gt; U
  </code></pre>
  
  <p>Here's my code:</p>
  
  <pre><code>dna = input()
  new = ""
  
  for i in dna:
      if i not in 'ATGC':
          print("Invalid Input")
          break
      if i == 'A':
          new += 'U'
      elif i == 'C':
          new += 'G'
      elif i == 'T':
          new += 'A'
      else:
          new += 'C'
  
  print(new)
  </code></pre>
  
  <p>This code passes all tests except aforementioned one. The correct output should be:</p>
  
  <pre><code>Invalid Input
  </code></pre>
  
  <p>The output my code gives:</p>
  
  <pre><code>Invalid Input
  UGCA
  </code></pre>
  
  <p>I have tried many iterations but I cannot get rid of <code>UGCA</code>. Even though I use <code>break</code> to get out of the loop in case of any <code>Invalid Input</code> the code is able to transcribe <code>ACGT</code> before <code>XXX</code> and print the result when it should just output <code>Invalid Input</code>.</p>
  
  <p>Can anyone see what I am missing?</p>