设置等分函数 #listTemp 为列表 平分后每份列表的的个数n def func(listTemp, n): for i in range(0, len(listTemp), n): yield listTemp[i:i + n] 我记录他人的,但是我不记得是谁的了