# 3.如何交换数组np.arange(9).reshape(3,3)中的第1行和第2行?
a = np.arange(9).reshape(3,3)
a = a[[1,0,2],:]
print(a)
[[3 4 5]
 [0 1 2]
 [6 7 8]]