如题所述
我也研究了很久,终于发现问题了. 函数没错. 错在定义 earth 的时候. earth = [[0]*n]*n # does not workearth = [[0,0,0],[0,0,0],[0,0,0]] # work