join 方法用于连接字符串数组
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
输出结果:
abcd
a-b-c-d
使用 % 连接多个变量
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
输出结果:
hello python 1 ['a', 'b', 'c', 'd']
Python 天天美味系列(总)
Python 天天美味(5) - ljust rjust centerPython 天天美味(6) - strip lstrip rstrip
Python 天天美味(7) - 连接字符串(join %)
...
本文转自CoderZh博客园博客,原文链接:http://www.cnblogs.com/coderzh/archive/2008/05/03/1180563.html,如需转载请自行联系原作者