title: Call python function based on command line argument
body: <p>I have a script with several functions:</p>
  
  <pre><code>def a():
     pass
  
  def b():
     pass 
  
  def c():
     pass
  </code></pre>
  
  <p>Which by design will be invoked depending on cmd line argument. I can create several if statements which will evaluate which function should run:</p>
  
  <pre><code>if args.function == "a":
      a()
  
  elif args.function == "b":
      b()
  elif args.function == "c":
      c()
  </code></pre>
  
  <p>But is there a better way to do this? </p>