I have a simple solution, but I think this is not the pythonic way. Do you have a suggestion?
def hasPath(myDict):
try:
myDict['A']['B']['C']
return False
except Exception:
return True
I have a simple solution, but I think this is not the pythonic way. Do you have a suggestion?
def hasPath(myDict):
try:
myDict['A']['B']['C']
return False
except Exception:
return True