Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to run string like normal code in python

prog = 'print("The sum of 5 and 10 is", (5+10))'
exec(prog)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #run #string #normal #code #python
ADD COMMENT
Topic
Name
8+1 =