I'm trying to find a way to exec() an if statement.
So, for example:
exampleCode = "if 0 < 1:"
exec(exampleCode)
print("Zero is less than one")
Now, obviously this isn't possible with exec(). But is it with something similar?
Something else that would work would be:
exampleCode = "if 0 < 1:"
exampleCode
print("Zero is less than one")
Again, this isn't possible, because variables cannot be code.
So, again, is there something else that may work?