Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. def function():
  2. string = "string"
  3. print(string)
  4.  
  5. new_func = "def do_stuff(): string = 'strung' # I don't know how to include the other line here "
  6.  
  7. new_code = compile(new_func,"",'exec')
  8.  
  9. eval(new_code)
  10.  
  11. function()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement