I have list like:
['name','country_id', 'price','rate','discount', 'qty']
and a string expression like
exp = 'qty * price - discount + 100'
I want to convert this expression into
exp = 'obj.qty * obj.price - obj.discount + 100'
as I wanna eval this expression like eval(exp or False, dict(obj=my_obj))
my question is what would be the best way to generate the expression for python eval evaluation....