其他分享
首页 > 其他分享> > .join用法

.join用法

作者:互联网

python的.join

str = "-";
seq = ("a", "b", "c"); # 字符串序列,可以放list
print str.join( seq );

js的.join

var arr = new Array(3)
arr[0] = "George"
arr[1] = "John"
arr[2] = "Thomas"
var abc = arr.join('-')
console.log(abc)  # George-John-Thomas

标签:arr,join,seq,Thomas,用法,var,John
来源: https://blog.csdn.net/jtpython666/article/details/120117527