def recursive_lookup(lookup, index_list):
    """
    Takes in indexes `index_list` in the form of a list of keys, and
    iteratively look through those keys in `lookup` until you reach the
    end of the list.
    For example, if given the list ['inventory', 'wood'] this method
    returns lookup['inventory']['wood']
    :return:
    """
    for index in index_list:
        lookup = lookup[index]
    return lookup