[Swift] 기초 예제 5 (딕셔너리)
//code1 var team = ["김윤","김찬","송성","윤영","정혜"] for i in team { print("\(i)") } //code2 var team = ["김윤","김찬","송성","윤영","정혜"] var nextTeam = ["이수","손윤","이제","박채","김하"] var addTeam = team+nextTeam for i in addTeam{ print("\(i)") } //code3 var teams : [String:String] = [ "김윤":"뉴진스", "김찬":"아이유", "송성":"윤성욱", "윤영":"10cm", "정혜":"장원영" ] for (key,value) in teams{ print("\(key):\(value)") } //code4 var tea..
2023. 6. 8.