title: How to validate user input in python
body: <p>I am brand new to python and I am trying to figure out how to validate user input. I want to ask the user to submit a DNA sequence and want to validate that it is a DNA sequence. Acceptable inputs can have upper or lowercase ATCGs and spaces and I'm not sure exactly how to do it.</p>
  
  <p>So far I can ask for the input but not verify it.</p>
  
  <pre><code>import sys
  Var1 = raw_input("Enter Sequence 1:")
  </code></pre>
  
  <p>I then want to do something like:</p>
  
  <pre><code>if Var1 != ATCG (somehow put 'characters that match ATCG or space)
      print "Please input valid DNA sequence"
      sys.exit() (to have it close the program)
  </code></pre>
  
  <p>Any help? I feel like this should be rather simple but I don't know how to specify that it can be any ATCG, atcg or space.</p>