Tower of hanoi

Tower Of Hanoi Game


def toh(num,a,b,c):
if num==1:
print("peg %d moving from %c->%c " %(num,a,c))
return

toh(num-1,a,c,b)
print("peg %d moving from %c->%c " %(num,a,c))
toh(num-1,b,c,a)

t=int(input("enter no of disks "))
toh(t,'a','b','c')