title: python store variable in function and use it later
body: <p>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</p>
  
  <p>for eg:during while loop, problem here is that when i try to retrieve the variable from store() it fails...as it needs arguments to be passed..</p>
  
  <pre><code>def store(a,b,c):
      x1 = a
      y1 = b
      z1 = c
      return (x1,y1,z1)
  
  def main():
      while condition:
            x = .......
            y = .......
            z = .......
            ......
            ......
            store(x,y,z) #store to function...
            ......
            ......
            ......
            s1,s2,s3 = store()
            ......
            ......
            ......
  </code></pre>