While traversing a graph in Python, a I\'m receiving this error:
\'dict\' object has no attribute \'has_key\'
Here is my code:
In python3, has_key(key) is replaced by __contains__(key)
has_key(key)
__contains__(key)
Tested in python3.7:
a = {'a':1, 'b':2, 'c':3} print(a.__contains__('a'))