def move(n, a, b, c): if n == 1: l = [a, b, c] return print(l[0],'-->',l[2]) move(n-1, a, c, b) l = [a, c, b] print(l[0],'-->',l[1]) move(n-1, b, a, c)
看完标答发现多用了个list。。想了想,的确很多余
Sign in to make a reply
尘上居然被抢注
看完标答发现多用了个list。。想了想,的确很多余