join 方法用于连接字符串数组 s = ['a', 'b', 'c', 'd']print ''.join(s)print '-'.join(s) 输出结果:abcda-b-c-d 使用 % 连接多个变量 a = 'hello'b = 'python'c = 1print '%s %s %s %s' % (a, b, c, s) 输出结果: hello python 1 ['a', 'b', 'c', 'd'] 转载于:https://www.cnblogs.com/qq78292959/archive/2013/05/08/3066638.html