# _*_coding:utf-8_*_
def hanoi(n, a, b, c):
if n > 0:
hanoi(n - 1, a, c, b)
print("moving from %s to %s" % (a, c))
hanoi(n - 1, b, a, c)
hanoi(5, 'A', 'B', 'C')
标签:www,utf,cnblogs,递归,hanoi,问题,汉诺塔
From: https://www.cnblogs.com/zylyehuo/p/17623576.html