Get your own website Result Size: 625 x 565
x
 
def myfunc1():
  x = "John"
  def myfunc2():
    nonlocal x
    x = "hello"
  myfunc2() 
  return x
print(myfunc1())
hello