def changes(a,b):
#list 分段函数,a:数据[(1),(2)]b:长度
for i in xrange(0,len(a),b):
yield a[i:i+b]
for i in changes(range(1,101),10):
print i
2024-04-12 18:20:02
def changes(a,b):
#list 分段函数,a:数据[(1),(2)]b:长度
for i in xrange(0,len(a),b):
yield a[i:i+b]
for i in changes(range(1,101),10):
print i