//元祖类型
//元祖将多个值组合为单个值,元祖内的值可以是任意类型,各元素不必是相同的类型.元祖在作为函数返回值时尤其有用
//定义方法一:(根据下标)
let ht = (404,"Not")
print("\(ht.0)")
print("\(ht.1)")
//定义方法2:(根据key)
let ht2 = (status:200,des:"OK")
print("\(ht2.status)")
print("\(ht2.des)")
//元祖类型
//元祖将多个值组合为单个值,元祖内的值可以是任意类型,各元素不必是相同的类型.元祖在作为函数返回值时尤其有用
//定义方法一:(根据下标)
let ht = (404,"Not")
print("\(ht.0)")
print("\(ht.1)")
//定义方法2:(根据key)
let ht2 = (status:200,des:"OK")
print("\(ht2.status)")
print("\(ht2.des)")