Hi there fellow Codecademy members,
I’m having a bit of a struggle debugging my Towers of Hanoi project in the stacks portion of linear data structures for Python3 (comp sci path). The code runs/functions with error messages, however, regardless of what the input for “from” and “to” stacks is/are, the code defaults to the else statement and prints: “Invalid Move. Try again.” I’ve followed along with the developer video and can’t seem to find the error in my code. I added code to print to_stack.is_empty() and from_stack.is_empty() to the terminal, and both return “False” whereas I’d expect the to_stack to return True, since the middle and right stacks show as empty when the game is started. Maybe (and hopefully) there is some syntax that I am overlooking, but I suspect the error lies in the get_input() function.
Here is the code: