Python String translate()
The string translate() method returns a string where each character is mapped to its corresponding character in the translation table. The translate() method takes the translation table to replace/translate characters in the given string as per the mapping table.