面试题答案
一键面试def get_value_by_path(dictionary, path):
current = dictionary
for key in path:
if not isinstance(current, dict) or key not in current:
return None
current = current[key]
return current
def get_value_by_path(dictionary, path):
current = dictionary
for key in path:
if not isinstance(current, dict) or key not in current:
return None
current = current[key]
return current