solving Tower of Hanoi recursively
<p>I know the idea behind the Tower of Hanoi and know the algorithm but I am having trouble implementing it.</p>

<pre><code>class Hanoi:
    def __init__(self, n):
       == code==

    def move(self, src, dst):
   =code for moving the disk from source to destination==

    def spare(self, src, dst):
    ==Returns the peg which is not src and dst==

    def print_pegs(self):


h = Hanoi(4)

def hanoi(n, src, dst):         
        if n==1:
           h.move(src,dst)
        else:
            spare=h.spare(src,dst)
            hanoi(n-1,src,spare)
            hanoi(1,src,dst)
            hanoi(n-1,spare,dst)

hanoi(4, 0, 2)
</code></pre>

<p>The problem i am having is I don't know how to combine the recursive definition with the class fuction to move the disks.</p>
