Swift_字典

来源:互联网 发布:linux hexdump命令 编辑:程序博客网 时间:2024/05/16 19:37


//字典    func  dictionaryAp(){        let a = ["s"]        var b = Dictionary<String,Any>()        b["a"] = "3"        b["b"] = 5        b["c"] = a                var d = ["a","3"]                        //遍历字典        for (e,c) in b {                        print("\(e) = \(c)")        }        }