while True: try: def gen(): """ 输入为int """ if 0 < m <= 9 and 0 < n <= 9: return 0 else: return -1 def swap(list): """ 输入为int列表 """ x1, y1, x2, y2 = list[0], list[1], list[2], list[3] # print(x1, y1, x2, y2) if 0 <= x1 < m ...