生成文本序列

时间:2021-02-20 12:04:01   收藏:0   阅读:0
import numpy as np
df = np.arange(0,210,10)
s  =  map ( str ,df)
s2 = []
for i in s:
    s2.append(i)
print(s2)

结果:

[‘0‘, ‘10‘, ‘20‘, ‘30‘, ‘40‘, ‘50‘, ‘60‘, ‘70‘, ‘80‘, ‘90‘, ‘100‘, ‘110‘, ‘120‘, ‘130‘, ‘140‘, ‘150‘, ‘160‘, ‘170‘, ‘180‘, ‘190‘, ‘200‘]

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!