Skip to content

Instantly share code, notes, and snippets.

@cuahutli
Created February 23, 2019 05:21
Show Gist options
  • Save cuahutli/e0144e0f823b4bf2f786e95c83749d1c to your computer and use it in GitHub Desktop.
Save cuahutli/e0144e0f823b4bf2f786e95c83749d1c to your computer and use it in GitHub Desktop.
import sys
code = """
def f(x):
x = x + 1
print("Montamos la función on the fly")
return x
#print('This is my output.')
"""
exec(code)
res = f(4)
print("el resultado es: " + str(res))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment