创建一个元组
let myInfo = ("lxd",26)
print(myInfo.0) //输出lxd
print(myInfo.1) //输出26
给元组中元素起别名
let myInfo1 = (myName : "lxd", myAge: 26)
print(myInfo1. myName) //输出lxd
print(myInfo1. myAge) //输出26
直接定义标示符为别名
let (myName, myAge) = ("lxd",26)
print(myName) //输出lxd
print(myAge) //输出26
其他应用场景
let errorInfo = (errorCode : 404, errorMsg: "Not Found")
errorInfo.errorCode
errorInfo.errorMsg