Learn Recursion by Solving the Tower of Hanoi Puzzle - Step 4

why does it require you to do
print(type(rods[‘A’]))
when
print(type(‘A’))
gets the same results

Your code so far


# User Editable Region

rods = {
    'A': range(3, 0, -1),
    'B': [],
    'C': []
}

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

Learn Recursion by Solving the Tower of Hanoi Puzzle - Step 4

Welcome to the forum @ControllerJunkie

Each gives a different result.
One gives range, the other gives string

Happy coding

thank you, i sometimes dont pay enough attention after doing this stuff for too long

1 Like