1

Is it possible to "run" python code inside python like this..

code = """
def getNumber():
   return 100

getNumber()
"""

number = Run(code)
print(number) # this should print 100
Curiousity
  • 29
  • 3

0 Answers0