title: basic python query regarding unpacking all values in an enumerated list of tuples in python
body: <p>I was just curious about this and thought this should logically work in python. I tried the following code in the python console:</p>
  
  <pre><code>mylist = [('a','b'),('c','d')]
  
  for i,x,y in enumerate(mylist):
      print i,x,y
  
  ValueError: need more than 2 values to unpack
  </code></pre>
  
  <p>But if I try to not enumerate and just do the following:</p>
  
  <pre><code>mylist = [('a','b'),('c','d')]
  
      for i,x in mylist:
          print i,x
  </code></pre>
  
  <p>it works fine. I was just wondering why the first method doesn't work as that shouldn't really hinder python unpacking values from tuples should it? Unless I have overlooked something embarrassingly simple. I'd really like to know the reason for this peculiar behavior.</p>
  
  <p><a href="https://stackoverflow.com/questions/11862694/how-to-generate-enumerated-tuples-from-a-dictionary-with-a-list-comprehension-in">How to generate enumerated tuples from a dictionary with a list comprehension in Python?</a></p>
  
  <p>says that the value of enumerate() function is a two element tuple. But in my case the second element of the tuple returned by enumerate would itself be a tuple so why can it not be unpacked?</p>