📜  golang 获取切片的最后一个元素 - Go 编程语言代码示例
📅  最后修改于: 2022-03-11 14:45:01.628000             🧑  作者: Mango
代码示例2
// Go doesn't have negative indexing like Python does.
a := []string{"A", "B", "C"}
s := a[len(a)-1] // C