title: Argparse :: ask 1 or 3 arguments
body: <p>I'm writing a script in order to search for factorized numbers. </p>
  
  <p>I want my script to accept <strong>1</strong> or <strong>3</strong> arguments, it should work only with:</p>
  
  <ul>
  <li><code>python myscript.py -i</code></li>
  <li><code>python myscript.py -e -n -o</code></li>
  </ul>
  
  <p>Otherwise it should print <code>--help</code>.</p>
  
  <p>Here is my code:</p>
  
  <pre><code># --- Here we organize the choices command line aruments                
  parser = argparse.ArgumentParser()                                      
  parser.add_argument('-i', dest='input', help="input a pubilc key .pem file", metavar=None) 
  parser.add_argument('-n', dest='modulus', help="value of modulus n (please input also -e and -o)", metavar=None)
  parser.add_argument('-e', dest='exponent', help="value of exponent e (please input also -n and -o)", metavar=None)  
  parser.add_argument('-o',dest='output', help="output a file name (please input also -n and -e)", metavar=None)                  
  args = parser.parse_args()                                              
  
  # --- Guide the user to the right choice ---                
  if (len(sys.argv) == 1 and args.input != None):    # &lt;-- problem must be around here I believe
      pass
  elif (len(sys.argv) == 3 and args.modulus != None and args.exponent != None and args.output != None ):
      pass
  else:
      parser.print_help()
  </code></pre>
  
  <p>But when I run <strong>python myscript.py -i</strong> first it prints the <strong>--help</strong> and then it execute the code. </p>
  
  <p>It shouldn't print <strong>--help</strong>: everything is fine, I'm giving 1 argument and it's <code>input</code></p>