[swift] 딕셔너리 요소 삭제하기 없애고 싶은 항목에 키에 nil을 할당하거나 removeValue 메소드를 사용하여 korKey라는 argument에 없애고 싶은 키를 전달하면 된다. var myDict = ["one":1, "two":2] myDict["two"] = nil print(myDict) myDict.removeValue(forKey: "one") print(myDict) swift & iOS/swift 2022.02.07