[Python] A problem for Python hackers: the solution

The solution for the problem I previously posted this month.

Of course, I had eval() in my mind:

>>> import math
>>> x=1.234
>>> s=str(eval("math.sin(x)"))
>>> s
>>> s=str(eval("math.sin(1.234)"))
>>> s

Warning: it's to be used with care...

Please drop me email about bug(s) and/or suggestion(s): my emails. List of my other blog posts.