一、列表元素拼接成字符串
phone_num = ['123456','654321','147258']
phone = ','.join(phone_num)
print(phone)
>>>123456,654321,147258
phone = str(phone)
print(phone)
>>>'123456,654321,147258'
phone_num = ['123456', '654321', '147258']
phone = ''.join(phone_num)
print(phone)
>>>123456654321147258
二、字符串转化成列表元素
phone_num = '123456,654321,147258'
phone = list(phone_num.split(','))
print(phone)
>>>['123456', '654321', '147258']
三、将一个连续的字符串数字分割开
phone_num = '123456654321147258'
phone = ','.join(phone_num)
print(phone)
>>>1,2,3,4,5,6,6,5,4,3,2,1,1,4,7,2,5,8