letx =1, y =2, z =3
print(x,y,z)
//separator设置分割符,默认是" "
print(x,y,z, separator:"--") //1--2--3
//terminator结束符,默认为回车
print(x,y,z, separator:"--", terminator:":)") //1--2--3:)
//字符串插值
print(y,"*",z,"=",y*z) //2 * 3 = 6
print("\(y) *\(z) =\(y*z)") //2 * 3 = 6
网友评论