Home > Q&A > body text
for i in range(0,len(row)): strs = i; print(strs) 我想要strs 的值是 0,1,2,3 就是一个累加的字符串
PHP中文网2017-04-18 10:24:31
s = ''
for i in range(0,5):
s += str(i)+','
print(s)
黄舟2017-04-18 10:24:31
strs = ','.join([str(_) for _ in range(4)]) print strs