lambda + zip实现多层嵌套列表
1.可滑动的序列 自定义一个函数 根据参数n的值 , 变成对应个元素的容器 (zip)
"""
listvar = [1,2,3,4,5,6,7,8,9]
n = 2
listvar = [[1,2],[3,4],[5,6],[7,8]]
n = 3
listvar = [[1,2,3],[4,5,6],[7,8,9]]
n = 4
listvar = [[1,2,3,4],[5,6,7,8]]
"""
func = lambda n : zip( *[ listvar[i::n] for i in range(n) ] )
it = func(2)