|   | 1 |  initial version  | 
To save to a file, you may try the following.
with open('filename.txt','w') as outfile:
    outfile.write("{0}\n".format(what_you_want(8)))
Searching for "write to file in python" might give some insight into this aspect of Python.
If you wish to process a list by chunks, then looking up "slicing in Python" might be useful. Given a list L, you may access the second chunk of length 40 by using L[40:80]. So using slicing within a for loop could produce the desired result.
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.