本文共 525 字,大约阅读时间需要 1 分钟。
phone_num = ['123456','654321','147258']phone = ','.join(phone_num)print(phone)>>>123456,654321,147258phone = 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
转载地址:http://wfwqj.baihongyu.com/