xvals = linspace(a, b, 1001) expr = //string taken as input yvals=list() for x in xvals: y=eval(expr) yvals.append(y) plt.plot(xvals, yvals)
Thi