📅  最后修改于: 2022-03-11 14:48:20.550000             🧑  作者: Mango
def sublist(lst, n):
sub=[] ; result=[]
for i in lst:
sub+=[i]
if len(sub)==n: result+=[sub] ; sub=[]
if sub: result+=[sub]
return result