def value_in_nested_dict(d, path_of_keys):
    """
    Follow a path of keys in a nested dict and return the value found
    at the end of the path.

    Args:
        d (dict): a (nested) dictionary with values
        path_of_keys (list): a list of keys

    Returns:
        object, if a value is found at the end of the path
        None, otherwise.

    >>> d = {'a': {1: 0.5, 2: 0.3}, 'b': 0.8}
    >>> value_in_nested_dict(d, ['a', 1])
    0.5
    >>> value_in_nested_dict(d, ['b'])
    0.8

    If `path_of_keys` contains keys not found in `d`, return None
    >>> value_in_nested_dict(d, ['X', 0.5]) is None
    True
    """
    if len(path_of_keys) == 0:
        return d
    else:
        try:
            return value_in_nested_dict(d[path_of_keys[0]], path_of_keys[1:])
        except KeyError:
            return None