title: TypeError: 'str' object is not callable in python script
body: <p>yes, i am an author of this <a href="https://stackoverflow.com/questions/43505938/change-conditions-using-loop-and-array-in-python">Change conditions using loop and array in python</a></p>
  
  <p>So, i am trying to change conditions from this:</p>
  
  <pre><code>if sys.argv[1] == 'add':
      sys.exit(add(db, usr))
  if sys.argv[1] == 'rem':
      sys.exit(rem(db, usr))
  if sys.argv[1] == 'rmusr':
      sys.exit(rmusr(db, usr))
  </code></pre>
  
  <p>I am trying to change these conditions at list with loop </p>
  
  <p>From answers of other developers, i used this:</p>
  
  <pre><code>actions = ['add','rem','rmusr']
  if sys.argv[1] in actions:
      sys.exit(sys.argv[1](db, usr))
  </code></pre>
  
  <p>But, when i am trying to check it function, i have this</p>
  
  <pre><code>  File "sql.py", line 25, in &lt;module&gt;
      sys.exit(sys.argv[1](db, usr))
  TypeError: 'str' object is not callable
  </code></pre>
  
  <p>I can't understand, where i have an error ?</p>