Devide a list in n sized chunks.

Friday, May 24, 2013


Here is the method to devide list in to chunks of n size
 def chunks(list, size):  
   for i in xrange(0, len(list), size):  
     yield list[i:i+size]  
 for list in list(chunks(product_without_season, 1000)):  
   print list