无意中在网上看到一个关于join比for循环更有效率的说法.虽然不明白为什么,先记一笔. join函数用于数组.返回值为一个字符串.实现的效果就是将数组连成自己想要的字符串,当然是有规律可循的字符串. 给一个简单的例子. var array=[1,2,3]; var result=array.join(".") 结果为:result="1.2.3"; 当然,如果你想画一个表格也是可以的 var array=[1,2,3]; var result="<
def join(self, iterable): # real signature unknown; restored from __doc__ """ S.join(iterable) -> str Return a string which is the concatenation of the strings in the iterable. The separator between elements is S. """ 上面是库