[Python] 纯文本查看 复制代码
cla = '1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,1.11,1.12,1.13,1.14,1.15,1.16'
list_1 = [cla.split(',')[i:i+3] for i in range(0,len(cla.split(',')),3)]
#[['1.1', '1.2', '1.3'], ['1.4', '1.5', '1.6'], ['1.7', '1.8', '1.9'], ['1.11', '1.12', '1.13'], ['1.14', '1.15', '1.16']]
print(list_1)
list_2 = cla.split(',')
#['1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '1.11', '1.12', '1.13', '1.14', '1.15', '1.16']
print(list_2)
list_2.remove('1.1')
#['1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '1.11', '1.12', '1.13', '1.14', '1.15', '1.16']
print(list_2)