Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def function():
- string = "string"
- print(string)
- new_func = "def do_stuff(): string = 'strung' # I don't know how to include the other line here "
- new_code = compile(new_func,"",'exec')
- eval(new_code)
- function()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement