logo
Published on Models of Motion (http://www2.evergreen.edu/modelsofmotion)

Function Output

def first(a,b):
    print "in first",a,b
    return a+b

def second(b):
    a=2
    print "before first",a,b,c
    a=first(c,a)
    print "in sec",a,b,c
    return a+c

a=3
b=4
print"begin"
c=first(b,a)
print "between calls"
b=second(c)
print "done",a,b,c


Source URL:
http://www2.evergreen.edu/modelsofmotion/modelsofmotion/function-output