[EMAIL PROTECTED] wrote: > hi > in python is there any way to do this > > op = "<" > a = 10 > b = 20 > if a op b : > print "a is less than b"
[EMAIL PROTECTED] wrote:
> hi
> in python is there any way to do this
>
> op = "<"
> a = 10
> b = 20
> if a op b :
> print "a is less than b"
Will this work for you?:
import operator
op = operator.lt
a = 10
b = 20
if op(a, b):
print "a is less than b"
-- bj0rn
--
http://mail.python.org/mailman/listinfo/python-list
