def get_in(dic, key):
    """Get maybe-nested value key from dic."""
    # Allow string or list keys
    if isinstance(key, str):
        return dic[key]

    if len(key) == 1:
        return dic[key[0]]
    else:
        return get_in(dic[key[0]], key[1:])