标签:class style init pytho rgb 分割 div 长度 code
1 def list_of_groups(init_list, childern_list_len): 2 ‘‘‘ 3 :param init_list: 4 :param childern_list_len: 5 :return: 6 ‘‘‘ 7 list_of_group = zip(*(iter(init_list),) *childern_list_len) # zip(childern_list_len ge list_iterator object) 8 end_list = [list(i) for i in list_of_group] # i is a tuple 9 count = len(init_list) % childern_list_len 10 end_list.append(init_list[-count:]) if count !=0 else end_list 11 return end_list
标签:class style init pytho rgb 分割 div 长度 code
原文地址:https://www.cnblogs.com/lpyy/p/14483819.html