def generator_five(parm, num): """ 将列表切分成每5个来返回 :param parm: :return: """ length = len(parm) for i in range(0, length, num): yield parm[i:i + num]