Discuss / Python / 这个咋不行,求大神

这个咋不行,求大神

Topic source

def move(n,a,b,c): if n==1: return(a,'-->',c) else: return move(n-1,a,c,b) print(a,'-->',c) move(n-1,b,a,c)

廖雪峰

#2 Created at ... [Delete] [Delete and Lock User]

n>1直接else: return


  • 1

Reply