closed = set() -here closed is a set
node is (5,5)
The error occurse at execution time.
Error is:
list objects are unhashable
the program is:
closed.add(node)
for val in closed:
print val
Node is the output of stack.
node = stack.pop() - it gives me...(5,5)
Traceback:
File "/home/", line 99, in depthFirstSearch
closed.add(node)
TypeError: list objects are unhashable