(dict_object, keys)
Given a dict object and list of keys, nest into those keys.

    :raises KeyError if the path isn't found.
    :raises TypeError if dict_object is not a dict
    :raises ValueError if keys is empty

    >>> recursive_lookup({'foo': 1}, ['foo'])
    1
    >>> recursive_lookup({'foo': {'bar': 1}}, ['foo'])
    {'bar': 1}
    >>> recursive_lookup({'foo': {'bar': 1}}, ['foo', 'bar'])
    1
Given a dict object and list of keys, nest into those keys.
Given a dict object and list of keys nest into those keys .
def recursive_lookup(dict_object, keys):
    """
    Given a dict object and list of keys, nest into those keys.

    :raises KeyError if the path isn't found.
    :raises TypeError if dict_object is not a dict
    :raises ValueError if keys is empty

    >>> recursive_lookup({'foo': 1}, ['foo'])
    1
    >>> recursive_lookup({'foo': {'bar': 1}}, ['foo'])
    {'bar': 1}
    >>> recursive_lookup({'foo': {'bar': 1}}, ['foo', 'bar'])
    1
    """
    if not keys or not isinstance(keys, list):
        raise ValueError('Keys must be a non-empty list!')

    if len(keys) == 1:
        return dict_object[keys[0]]
    else:
        return recursive_lookup(dict_object[keys[0]], keys[1:])
def recursive_lookup ( dict_object , keys ) : if not keys or not isinstance ( keys , list ) : raise ValueError ( 'Keys must be a non-empty list!' ) if len ( keys ) == 1 : return dict_object [ keys [ 0 ] ] else : return recursive_lookup ( dict_object [ keys [ 0 ] ] , keys [ 1 : ] )