def func1():
x = 100
john = 'hello'
return x, john
def func2():
func1()
y = x
return y
print(func2())
So this returns an error:
NameError: name 'x' is not defined
Can someone explain how to use variables of func1 in func2, and explain how calling func1 in func2 work.