#递归 i = 1 def move(n, a, b, c): global i if n == 1: print('Step:', i, a, '-->', c) return move(n-1, a, c, b) i = i + 1 print('Step:', i, a, '-->', c) i = i + 1 move(n-1, b, a, c) move(3,'A','B','C')
Sign in to make a reply
学生Summer