主页
Go
Go 映射
demo_maps9
运行 ❯
×
更改方向
保存代码
更改主题
package main import ("fmt") func main() { a := map[string]int{"one": 1, "two": 2, "three": 3, "four": 4} for k, v := range a { fmt.Printf("%v : %v, ", k, v) } }
two : 2, three : 3, four : 4, one : 1,