版权声明:本文为我的原创文章,未经博主允许不得转载,如需帮助,请联系[email protected] https://blog.csdn.net/LeegooWang/article/details/81506414
如何讲python中的数组转成字符串
如果是数字数组,需要进行转化
如下
array=[1,2,3,4]
str_array=",".join(map(str, array))
print(str_array)
运行结果为:
1,2,3,4’
如何讲python中的数组转成字符串
如果是数字数组,需要进行转化
如下
array=[1,2,3,4]
str_array=",".join(map(str, array))
print(str_array)
运行结果为:
1,2,3,4’