1.str >>>list
1 | str1 = "12345" |
1 | str2 = "123 sjhid dhi" |
1 | str3 = "www.google.com" |
输出为:
[‘1’, ‘2’, ‘3’, ‘4’, ‘5’]
[‘123’, ‘sjhid’, ‘dhi’]
[‘www’, ‘google’, ‘com’]
3.list >>>str
1 | str4 = "".join(list3) |
输出为:
wwwgooglecom
www.google.com
www google com
参考链接: