123456789101112131415161718192021222324252627282930 |
- package main
- import "fmt"
- func main() {
-
-
-
-
-
-
-
-
-
- counts := make(map[string]int)
- fatherCounts := make(map[string]map[string]int)
- counts["A"] = 1
- counts["B"] = 2
- fatherCounts["A"] = counts
- fmt.Printf("%d\n",counts["A"])
- delete(fatherCounts["A"],"A")
- fmt.Printf("A:%d,B:%d,C:%d\n", fatherCounts["A"]["A"],fatherCounts["A"]["B"],fatherCounts["A"]["C"])
- for key := range fatherCounts {
- fmt.Printf("key:%s",key)
- }
- }
|