BFS: shortest path in a grid — Python practice — Live Code Tutor