title: How do I check for multiple exceptions in Python?
body: <p>DNASequence = "laksjfklsajdfklsajfklasjfklsad"</p>
  
  <pre><code>    while True:
          lMerLength = input("Please enter the length of the l-mers of the universal array :")
          try:
              if len(DNASequence) &gt;= lMerLength &gt; 0:
                  break
          except SyntaxError:
              pass
          #This is not working. How do I check for multiple exceptions in Python?
          except NameError:
              pass
          print "ERROR: Please check your input. You entered an invalid input."
  </code></pre>