Python eval is quite slow. I need to evaluate simple boolean expression with logical operators (like \"True or False\"). I am doing this for thousands of line o
eval
import operator ops = { 'or': operator.or_, 'and': operator.and_ } print ops[op](True, False)