title: How to condense one long list into several smaller lists every numlist indexes?
body: <p>I have a huge list of float values and a small list of float values. I want to break my huge list into several smaller lists with each having a length equal to the length of my small list. </p>
  
  <p>As an example, consider:</p>
  
  <pre><code>huge = [1.2,3.0,5.6,8.9,10.7,4.3,7.6,9.8,11.6,13.2,12.8,14.5] # len = 12
  small = [1,2,3] # len = 3
  numlist = len(huge)/len(small) # 4 sublists in listomega
  listomega = [[] for index in range(numlist)] # index = 0,1,2,3
  
  ### ????
  
  print(listomega)
  &gt;&gt;&gt; [[1.2,3.0,5.6],[8.9,10.7,4.3],[7.6,9.8,11.6],[13.2,12.8,14.5]]
  
  print(listomega[0])
  &gt;&gt;&gt; [1.2,3.0,5.6]
  </code></pre>
  
  <p>How can I go about doing this?</p>
  
  <p>I noticed <a href="https://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks?noredirect=1&amp;lq=1">this answer</a> which seemed to have a solution, though I cannot print the result.</p>
  
  <pre><code>print(chunks(l, n))
  &gt;&gt;&gt; &lt;generator object chunks at 0x10b3f1f68&gt;
  </code></pre>