python 字符串列表的连接

strList = ["Python", "is", "good"]  
 
res =  ' '.join(strList) #Python is good

  

 

res = ''
for s in strList:
    res += s + ' '
#Python is good 
#最后还有个多余空格

  

posted @ 2015-10-28 09:15  arhatlohan  阅读(970)  评论(0编辑  收藏  举报