On Fri, Aug 28, 2009 at 1:52 PM, Duke Normandin <dukeofp...@ml1.net> wrote:

> How do I convert the contents of "op" from a string to an actual
> arithmetic operator? eval() does not seem to be the answer. TIA!


Maybe you were looking for

print eval(num1 + op + num2) # it's a little ugly string concatenation.

Hm? (untested, but it works in my head.)

Cheers,
Xav
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to