[Solved] build a perfect maze recursively in python
The problem is that you’re not ensuring that the steps in your walk are valid. The way you have it currently, walk could pick a neighboor that is out of the bounds of the maze. For example, if a maze is 5×5, attempting to access maze[5][?] or maze[?][5] will result in an IndexError like you … Read more