Back to Freecodecamp

Step 5

curriculum/challenges/english/blocks/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc90949ff85e3b37be40d0.md

latest578 B
Original Source

--description--

The range() function returns an immutable sequence of numbers. As you can see, the data type of rods['A'] is range, but you want it to be a list.

Pass your range() call to the list() function to do that.

--hints--

You should pass your range() call to the list() function.

js
({ test: () => assert(runPython(`
  rods['A'] == list(range(3, 0, -1))
  `))
})

--seed--

--seed-contents--

py
--fcc-editable-region--
rods = {
    'A': range(3, 0, -1),
    'B': [],
    'C': []
}
print(type(rods['A']))
--fcc-editable-region--