Python Split List en n sublistes
[input[i:i+n] for i in range(0, len(input), n)] # Use xrange in py2k
Doubtful Dotterel
[input[i:i+n] for i in range(0, len(input), n)] # Use xrange in py2k
def split_list(alist, wanted_parts=1):
length = len(alist)
return [ alist[i*length // wanted_parts: (i+1)*length // wanted_parts]
for i in range(wanted_parts) ]