//元组
//不需要的元素用 _ 标记
let (name,age,_) = ("明明","10","")
print(name,age)

//通过下标访问特定的元素
let student = ("明明","10","")

print(student.0,student.1,student.2)

let bobo = (name:"波波",age:"24")
print(bobo.name,bobo.age)

 

相关文章:

  • 2022-12-23
  • 2021-09-29
  • 2022-03-04
  • 2021-09-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-08
猜你喜欢
  • 2021-11-25
  • 2022-12-23
  • 2021-11-14
  • 2021-04-04
  • 2022-01-15
相关资源
相似解决方案