2021-12-14 Golang基础 02 Golang交换两个值 02 交换两个值12345678910111213package mainimport "fmt"func main() { var a = 3 var b = 4 _, b = b,a // _表示丢弃的值,最终结果为3, 3 fmt.Println("a =", a, "", "b = ", b)} Newer 01 Golang初识 Older 05 Golang条件_循环语句