[swift] Swift 딕셔너리에서 키와 값의 개수를 확인하는 방법은?
let myDictionary = ["a": 1, "b": 2, "c": 3]
let keyCount = myDictionary.keys.count
let valueCount = myDictionary.values.count

print("Key count: \(keyCount)") // 출력: Key count: 3
print("Value count: \(valueCount)") // 출력: Value count: 3