字符串转数组
str = ‘1,2,3‘
arr = str.split(‘,‘)
数组转字符串
arr = [‘a‘,‘b‘]
str = ‘,‘.join(arr)
arr = [1,2,3]
str = ‘,‘.join(str(i) for i in b)
本文出自 “我的运维时光” 博客,请务必保留此出处http://aaronsa.blog.51cto.com/5157083/1742781
原文:http://aaronsa.blog.51cto.com/5157083/1742781