```go
func main(){
n := []int{1,2,3,4,2,3,4,2}
fmt.Println(n)
m := n
for k,v := range m{
if v == 2 {
m = append(m[:k],m[k+1:]...)
}
fmt.Println(k,"========",v,"--",m)
}
fmt.Println(n)
fmt.Println(m)
}
```
```想知道range工作原理,range m 与 for 循环的m是否是同一个m
```
有疑问加站长微信联系(非本文作者)