def replace_list(mylist, mydict):
    """
    replace values in a list
    :param mylist: list to be replaced
    :param mydict: dictionary of correct values
    :return: list
    """
    newlist = []
    for m in mylist:
        if m in mydict.keys():
            newlist.append(mydict[m])
        else:
            newlist.append(m)
    return newlist
