Javatpoint Logo
Javatpoint Logo

Python String translate() Method

Python translate() method a string in which each character has been mapped through the given translation table. We can use maketrans() method to create a translation map from character-to-character mappings in different formats.

Signature

Parameters

table : A translation table.

Return

It returns a string.

Let's see some examples of translate() method to understand it's functionality.

Python String translate() Method Example 1

Output:

Hellp jgvgtppint

Next TopicPython Strings





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA