translate() - Returns a translated string

Returns the translated string, given a string of original characters and the "translate to" characters.

Example

Python
src = 'Hi Marc!'
translation = src.maketrans('Marc', 'Kyra')
translated = src.translate(translation)
print(translated)

Output

Hi Kyra!