def translate(old_string, key):
    '''translate(string, list)

    Create a new string.
    Translate the old string into the new string.
    Return the new string.'''
    new_string = str()
    for character in old_string:
        new_string += chr(key[ord(character)])
    return new_string
translate(string, list)

    Create a new string.
    Translate the old string into the new string.
    Return the new string.
recipes/Python/440628_Encrypting_A_String/recipe-440628.py