I want to use a string of a polynomial in a lambda expression, but I couldn't figure out how to do it. It may not be possible, but if it is I'd love some help!
An example of what I'm trying to do is:
f = lambda x: '3*x^3 + 2*x^2 -4*x +8'
Assume that I only have access to the polynomial in type str.
Is there something that removes the quotes or a version of eval that works with variables?