膜拜一位大神:ID叫“不太灵光的程序员”,思路是他的,我就是自己又写了一遍,缩小了一下行数。 def findway(x,y,path): if x == m-1 and y == n-1: [print(f'({l[0]},{l[1]})') for l in path] if x+1 <= m-1 and (x+1,y) not in path and maze[x+1][y] == '0': findway(x+1, y, path + [(x+1, y)]) if y+1 <= n-1 and (x,y+1) not ...