Python interpret input as math function : <p>How do you turn a string gathered from input into an actual function? For example,</p>

<pre><code>    &gt;&gt;&gt;function = input("Enter a function: ")
    &gt;&gt;&gt;Enter a function: "sin(t)"
</code></pre>

<p>And then I'd be able to use the entered function. Is there a library to parse through the string and return a math function like so?</p>
