.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
上一篇:oracle insert into 获取自动增长列值


下一篇:来重新认识元组吧