>>> a = [1,2,3,4,5,6,7,8,9,0]
>>> n = 3>>> c= [a[i:i+n] for i in range(0, len(a), n)]
>>> a [[1], [2], [3]] >>> b = [] >>> [b.extend(li) for li in a] [None, None, None] >>> b [1, 2, 3]