问题
I have sting input like:
12 == 21
(10 != 12) or (15 == 13)
True and (10 == 10)
And i need to return boolean value of this input. Can i convert it using exec()
or bool()
? I don't want to write big method to solve it .
来源:https://stackoverflow.com/questions/53675559/how-to-convert-string-to-boolean-logic