title: arithmetic expression reader in python
body: <p>I am trying to make an expression reader in python to compute basic arithmetic.</p>
  
  <p>given the expression <code>subtract(4,add(4,times(3,4)))</code> --> -12</p>
  
  <p>What would be the most pythonic way to build this? My method would be to convert the expression to a string, then create many if statements or switch cases to find keywords such as <code>add</code>,<code>subtract</code>, or <code>times</code>. Then read the <code>(</code>, read an integer and comma, and then run the if statement/switch case again. If a <code>)</code> is ever encountered, that is when compute the required arithmetic of the latest key work. Pretty much storing key works and integers in a queue and computing the latest <code>subtract</code>,<code>times</code>, or <code>add</code> in the queue when <code>)</code> is found. This to me seems a bit too much. I was wondering if there are any useful built in functions in python that would make the code pythonic or easier to read</p>