title: Python instructions outside Try: Except:
body: <p>I have a single line inside a Try/Except block, but another line outside this block is being executed when there is an exception. I'm on my phone so I'll just enter a few lines</p>
  
  <pre><code>try:
      total=total+int(number)
  except:
      print('Bad input')
  count = count + 1
  </code></pre>
  
  <p>When I enter a number, the count gets incremented as expected. If a character is entered, the exception is caught, but the count still gets incremented. I thought only the lines within the try/except block were repeated if there was an exception.</p>