Answers for "best way to access nested key in python"

0

best way to access nested key in python

def safeget(dct, *keys):
    for key in keys:
        try:
            dct = dct[key]
        except KeyError:
            return None
    return dct
Posted by: Guest on January-18-2022

Code answers related to "best way to access nested key in python"

Python Answers by Framework

Browse Popular Code Answers by Language