-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
new featureA new featureA new feature
Description
"str.translate(table)
Return a copy of the string in which each character has been mapped through the given translation table. The table must be an object that implements indexing via __getitem__(), typically a [mapping](https://docs.python.org/3/glossary.html#term-mapping) or [sequence](https://docs.python.org/3/glossary.html#term-sequence). When indexed by a Unicode ordinal (an integer), the table object can do any of the following: return a Unicode ordinal or a string, to map the character to one or more other characters; return None, to delete the character from the return string; or raise a [LookupError](https://docs.python.org/3/library/exceptions.html#LookupError) exception, to map the character to itself.
You can use [str.maketrans()](https://docs.python.org/3/library/stdtypes.html#str.maketrans) to create a translation map from character-to-character mappings in different formats."
Metadata
Metadata
Assignees
Labels
new featureA new featureA new feature
Projects
Status
Done