title: python ValueError: too many values to unpack in tuple
body: <p>So I am extracting data from a JSON file.</p>
  
  <p>I am trying to pack my data in a way so a preprocessing script can use it.</p>
  
  <p>preprocessing script code:</p>
  
  <pre><code>for key in split:
      hist = split[key]
      for text, ans, qid in hist:
  </code></pre>
  
  <p>Now I have an extracted dataset into a Dictionary like this:</p>
  
  <pre><code>dic{}
  result //is the result of removing some formatting elements and stuff from the Question, so is a question string
  answer //is the answer for the Q
  i // is the counter for Q &amp; A pairs
  </code></pre>
  
  <p>So I have</p>
  
  <pre><code>this = (result,answer,i)
  dic[this]=this
  </code></pre>
  
  <p>And when I try to replicate the original code I get the Too many values to unpack error</p>
  
  <pre><code>for key in dic:
      print(key)
      hist = dic[key]
      print(hist[0])
      print(hist[1])
      print(hist[2])
      for text, ans, qid in hist[0:2]:  // EDIT: changing this to hist[0:3] or hist has no effect
          print(text)
  </code></pre>
  
  <p>OUTPUT:</p>
  
  <pre><code>(u'This type of year happens once every four', u'leap', 1175)
  This type of year happens once every four
  leap
  1175
  Traceback (most recent call last):
    File "pickler.py", line 34, in &lt;module&gt;
      for text, ans, qid in hist[0:2]:
  ValueError: too many values to unpack
  </code></pre>
  
  <p>As you can see I even tried limiting the right side of the assignment but that didn't help either</p>
  
  <p>and as you can see the output matches as it should for each item</p>
  
  <pre><code>hist[0]=This type of year happens once every four
  hist[1]=leap
  hist[2]=1175
  </code></pre>
  
  <p>And len(hist) returns 3 also.</p>
  
  <p>Why the hell is this happening? Having hist,hist[:3],hist[0:3] has the same result, Too many values to unpack error.</p>