Although not the idea of how to do it, but feel the understanding of the problem is a step further, the previous use of Java to think for a long time to think very confused, or Python language concise, especially good understanding, as follows:
Topic:
Hanoi: Hanoi (also known as Heneta) is a puzzle toy from an ancient Indian legend. When the great Brahma created the world, he made three diamond pillars and stacked 64 gold discs on a pillar from the bottom up to the top in order of size. Brahma ordered the Brahman to rearrange the disc from below to another pillar in order of size. It is also stipulated that the disc cannot be enlarged on a small disc and only one disc can be moved between the three pillars at a time.
Solution:
def moves (n,a,b,c):
if n==1:
print (A, '--> ', c)
else:
Move (n-1,a,c,b) #将前n-1 plates moving from A to B
Move (1,a,b,c) #将最底下的最后一个盘子从a移动到c上
Moving (n-1,b,a,c) #将b上的n-1 plates moved to C moves
(3, ' A ', ' B ', ' C ')