title: Return different variables from map()
body: <p>Is it possible, while using the map() function in python (2.7) to return more than one variable? I tried doing something like this, </p>
  
  <pre><code>class obj1:
  
      def __init__(self,var):
          self.var = var
  
      def func1(self,a):
  
          b = [a**2 + y + self.var for y in range(4)]
          c = [a**3 + y + self.var for y in range(4)]
          return b, c
  
  list1 = [obj1(x) for x in range(10)]
  b,c = map(lambda x: x.func1(), list1)
  </code></pre>
  
  <p>but it says it has too many values to unpack. so I tried to do:</p>
  
  <pre><code>d = map(lambda x: x.func1(), list1)
  </code></pre>
  
  <p>but it returns a list of tuples instead of the two lists that I wanted.</p>
  
  <p>So, my question is, is there any efficient way of returning two lists from a map function? Thanks in advance.</p>