title: How to accept only string type arguments in Python 3
body: <p>I am trying to create some argument parameters for my python file. I only want to accept String type as arguments. Below is my code of foo.py - </p>
  
  <pre><code>import argparse
  
  if __name__ == "__main__":
      parser = argparse.ArgumentParser()
  
      # options to the user 
      parser.add_argument('--source_table', type = str, required = True)
  
      args = parser.parse_args()
      params = vars(args) # convert arguments to dictionary
      print(type(params['source_table'])) # prints &lt;class 'str'&gt;
  </code></pre>
  
  <p>When I give string arguments as -</p>
  
  <pre><code>&gt;python foo.py --source_table=abc
  </code></pre>
  
  <p>It prints</p>
  
  <pre><code>&lt;class 'str'&gt;
  </code></pre>
  
  <p>whereas, even if I type</p>
  
  <pre><code>&gt;python foo.py --source_table=123
  </code></pre>
  
  <p>it prints</p>
  
  <pre><code>&lt;class 'str'&gt;
  </code></pre>
  
  <p>I would like throw an error saying that only String type is accepted.</p>