title: Python cast character to operation
body: <p>I'm writing a simple Python program for a projecteuler question, and it involves generating a search space over operations, ex: </p>
  
  <pre><code>8 = (4 * (1 + 3)) / 2
  14 = 4 * (3 + 1 / 2)
  19 = 4 * (2 + 3) − 1
  36 = 3 * 4 * (2 + 1)
  </code></pre>
  
  <p>I'm storing possible operations in an array:</p>
  
  <pre><code>op = ['+', '-', '*', '/']
  </code></pre>
  
  <p>I was wondering if there's any way in Python to cast a character to an operation, so I could simply do something like:</p>
  
  <pre><code>for operation in op:
      num1 foo(operation) num2
  </code></pre>