Function Details: translate

Description


Returns a copy of the string in which each character has been mapped through the given translation table.


Extended Description


The translate() method returns a string where each character has been mapped through the given translation table. The table must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None. If a character is mapped to None, it is deleted from the string.


Read More about translate from Python Documentation

Function Signature



Module: builtins

Class: str

Parameters



Parameter List


  • table: Union[dict, str]

Return



Return Type


str

Output

Explanation