is it possible to store a variable from a while loop to a function and then call that same variable from the function at the end of the loop
for eg:during while loop, p
Technically speaking, if you had a deep, burning desire to do this with functions, you can always do it with a closure (which is, as we all know, a poor man's object):
def store(a,b,c): def closure(): return (a,b,c) return closure stored = store(1,2,3) print stored()
prints in (1,2,3)
(1,2,3)