title: Sys.exit() throwing a syntax error
body: <p>I'm creating a function that checks input and exits if input is not in the correct form. However, I'm getting an error that sys.exit() is 'invalid syntax'. Any help would be much appreciated!</p>
  
  <pre><code>import re 
  import sys
  
  def my_program(x):
  # takes input in form '#d#'
      if re.match('\d\w\d', x ) is False:
          print('Format of input must be '#d#')
      sys.exit()
  </code></pre>