标签:pre hello str1 class python blog split logs 字符
str1 = "hi hello world" print(str1.split(" "))
输出:
[‘hi‘, ‘hello‘, ‘world‘]
l = ["hi","hello","world"] print(" ".join(l))
输出:
hi hello world
标签:pre hello str1 class python blog split logs 字符
原文地址:http://www.cnblogs.com/guxiaobei/p/7739729.html