Answers for "how to run string like normal code in python"

0

how to run string like normal code in python

prog = 'print("The sum of 5 and 10 is", (5+10))'
exec(prog)
Posted by: Guest on April-28-2022

Code answers related to "how to run string like normal code in python"

Python Answers by Framework

Browse Popular Code Answers by Language