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
  • 39
  • 4

0 Answers0