MCPcopy Index your code
hub / github.com/python/cpython / hanoi

Function hanoi

Lib/turtledemo/minimal_hanoi.py:38–42  ·  view source on GitHub ↗
(n, from_, with_, to_)

Source from the content-addressed store, hash-verified

36 return d
37
38def hanoi(n, from_, with_, to_):
39 if n > 0:
40 hanoi(n-1, from_, to_, with_)
41 to_.push(from_.pop())
42 hanoi(n-1, with_, from_, to_)
43
44def play():
45 onkey(None,"space")

Callers 1

playFunction · 0.85

Calls 2

pushMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…