We also need to know, given a cell, which of its neighbours has all of its walls intact. Write the function wallsintact that accepts the grid and a list of neighbouring cells and returns those whose four walls are intact.
e.g. >>> intact=wallsintact(grid,neighbours)
>>> intact
[('cell', (2, 3), ['t', 'b', 'r', 'l']), ('cell',
(3, 2), ['t', 'b', 'r', 'l']), ('cell', (3, 4),
['t', 'b', 'r', 'l'])]