1a = """
2A = 5
3if A > 0 :
4 print("A Is Positive")
5elif A == 0 :
6 print("A Is Equal To 0")
7else :
8 print("A Is Negative")
9"""
10exec(a)
11>>> A Is Positive
12#you can also use eval(string) for asyncio
1import foo
2method_to_call = getattr(foo, 'bar')
3result = method_to_call()