title: Tuple Unpacking and Generating variable name automatically using a loop
body: <p>I have a function which returns 4 lists.</p>
  
  <pre><code>def foo ( Input1, input 2)
      return list1, list2, list3, list 4
  </code></pre>
  
  <p>I am using following code right now:</p>
  
  <pre><code>x0, y0, z0, w0 = foo(ip0, ip4)
  x1, y1, z1, w1 = foo(ip3, ip1)
  x2, y2, z2, w2 = foo(ip3, ip4)
  x3, y3, z3, w3 = foo(ip1, ip2)
  </code></pre>
  
  <p>I want to reduce the number of lines and may be use a <code>for</code> loop.</p>
  
  <p>I tried while loop:</p>
  
  <pre><code>i=0
  while i&lt;3:
      'x'+str(i), 'y'+str(i),'z'+str(i),'w'+str(i)= foo(input[i], input[i])
      i +=1
  </code></pre>
  
  <p>Python is throwing an error, it thinks I am assigning a value to a string. How do I unpack the tuple and generate variable name using a loop or automatically?</p>