How can I refer to a previous function in a new function in python 2.7.
For instance, say if I want to display the result which function1 calculated in function2. How would I go about this?
How can I refer to a previous function in a new function in python 2.7.
For instance, say if I want to display the result which function1 calculated in function2. How would I go about this?
wouldn't it be:
def func_one():return 2 + 2def func_two():x = func_one()print xfunc_two()
#output: 4