python run text code example
Example 1: python execute string
a = """
A = 5
if A > 0 :
print("A Is Positive")
elif A == 0 :
print("A Is Equal To 0")
else :
print("A Is Negative")
"""
exec(a)
>>> A Is Positive
#you can also use eval(string) for asyncio
Example 2: how to run python program
move to the directory where your program lies
open cmd
python first_script.py(your file name)