mardi 4 décembre 2018

Transform string into IF argument

How to transform a string into a logical argument in Python, to be inserted as an argument of the if() function?

For example:

string = "(A != 0) and (B >= 5)"

How can this string be transformed into the very logic that it represents so that it can be inserted into an if() function?

Aucun commentaire:

Enregistrer un commentaire