title: input a symbolic function in a python code
body: <p>I was just wondering if there is a method to input a symbolic function in a python code?</p>
  
  <p>like in my code I have:</p>
  
  <pre><code>from sympy import *
  import numpy as np
  import math
  myfunction = input("enter your function \n")
  l = Symbol('l')
  
  print myfunction(l**2).diff(l)
  </code></pre>
  
  <p>If I put cos, sin or exp, as an input then I have an output of:  <code>-2*l*sin(l**2)</code></p>
  
  <p>What If I want to make the input function more general, say a polynomial or a complex function, or maybe a function of combined cos, sin and exp ???</p>