title: Python argparse example?
body: <p>I'm trying to learn argparse in order to use it in my program, the syntax should be like this:</p>
  
  <pre><code>-a --aLong &lt;String&gt; &lt;String&gt;
  -b --bLong &lt;String&gt; &lt;String&gt; &lt;Integer&gt;
  -c --cLong &lt;String&gt;
  -h --help
  </code></pre>
  
  <p>I have this code:</p>
  
  <pre><code>#!/usr/bin/env python
  #coding: utf-8
  
  import argparse
  
  if __name__ == '__main__':
      parser = argparse.ArgumentParser(description='Lorem Ipsum')
      parser.add_argument('-a','--aLong', help='Lorem Ipsum', required=False)
      parser.add_argument('-b','--bLong', help='Lorem Ipsum', required=False)
      parser.add_argument('-c','--cLong', help='Lorem Ipsum', required=False)
      parser.add_argument('-h','--help', help='Lorem Ipsum', required=False)
      parser.parse_args()
  </code></pre>
  
  <p>The question is, I read in the official doc, saw YouTube videos, etc, but I couldn't understand how can I determine the number of "sub-arguments" of the "main-argument"?</p>
  
  <p>Example: <code>myApp.py -b Foobar 9000</code>, how can I set that <code>-b</code> must have two "sub-arguments", and how can I get the values, <code>Foobar</code> and <code>9000</code>?</p>
  
  <p>And another doubt, I know I can set an argument to be <code>required</code> or not, but I wanted to make my program only executes when <strong>at least one</strong> argument is passed, any of the four mentioned.</p>
  
  <p>Maybe it's a stupid question, but sorry, I can't understand it, and hopefully there is someone here with "teacher powers" to explain it.</p>