Towers of Hanoi



I arrived at the Towers of Hanoi project in the Python course. I’m a beginner so it’s really difficult to finish this exercise without any provided solution / video walkthrough which was the case for previous projects.

Is someone willing to share the full solution with me? Thank you.


Follow-up question.

In step 14 you need to provide the following list comprehension.

choices = [stack.get_name()[0] for stack in stacks]

What is the purpose of “[0]” please?


stack is a list. The [0] is the index number in stack you are referencing.


my completed code is here:


Thank you man for the solution