While traversing a graph in Python, a I\'m receiving this error:
\'dict\' object has no attribute \'has_key\'
Here is my code:
has_key was removed in Python 3. From the documentation:
has_key
Removed dict.has_key() – use the in operator instead.
dict.has_key()
in
Here's an example:
if start not in graph: return None