title: Is there a way to create argument in python's argparse that returns true in case no values given
body: <p>Currently <code>--resize</code> flag that I created is boolean, and means that all my objects will be resized:</p>
  
  <pre><code>parser.add_argument("--resize", action="store_true", help="Do dictionary resize")
  
  # ...
  
  # if resize flag is true I'm re-sizing all objects
  if args.resize:
      for object in my_obects:
          object.do_resize()
  </code></pre>
  
  <p>Is there a way implement argparse argument that if passed as boolean flag (<code>--resize</code>) will return true, but if passed with value (<code>--resize 10</code>), will contain value.</p>
  
  <p>Example:</p>
  
  <ol>
  <li><code>python ./my_script.py --resize # Will contain True that means, resize all the objects</code></li>
  <li><code>python ./my_script.py --resize &lt;index&gt; # Will contain index, that means resize only specific object</code></li>
  </ol>