func main() {
a := []int{1, 2, 3}
b := []int{2, 3, 4, 5, 6}
a = append(a, b...)
fmt.Println(a)
}
golang 切片合并(1)
最新推荐文章于 2024-10-04 19:02:51 发布
func main() {
a := []int{1, 2, 3}
b := []int{2, 3, 4, 5, 6}
a = append(a, b...)
fmt.Println(a)
}