Python join方法

用相应格式的字符串将序列链接起来。

1 a = ['wo','hao','shuai']
2 
3 print("".join(a))
4 
5 'wohaoshuai'
6 
7 print("-".join(a))
8 
9 wo-hao-shuai
原文地址:https://www.cnblogs.com/Presley-lpc/p/9142434.html