title: Checking the number of command line arguments in python
body: <p>I'm new to python.  Still getting my feet wet.  I'm trying to do something like this:</p>
  
  <pre><code>import sys
  
  if ((len(sys.argv) &lt; 3 or &lt; len(sys.argv &gt; 3)):
      print """\
  This script will compare two files for something
  and print out matches
  
  Usage:  theScript firstfile secondfile
  """
      return
  </code></pre>
  
  <p>I want to do this at the beginning of the script to check for the right number of arguments.  The problem is "return" doesn't work here.  I could do some big if then statement I suppose, but was hoping to not have to do that.  Not sure if there is any easier way.  Any ideas?</p>