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 has been deprecated in Python 3.0. Alternatively you can use 'in'
graph={'A':['B','C'], 'B':['C','D']} print('A' in graph) >> True print('E' in graph) >> False