Sep-11-2018, 07:58 AM
I want to be able to use the variables in test1, test2 and test3 in testall all like this
def test1():
x = 1
def test2():
y = 2
def test3():
z = 3
def testall():
print(x)
print(y)
print(z)
I have tried using the command return but that does not work at it does not allow the execution of code after the return.
The simpler the solution the better because I am quite new at python and don't really understand more complex coding.
def test1():
x = 1
def test2():
y = 2
def test3():
z = 3
def testall():
print(x)
print(y)
print(z)
I have tried using the command return but that does not work at it does not allow the execution of code after the return.
The simpler the solution the better because I am quite new at python and don't really understand more complex coding.