Kaydet (Commit) 638b8690 authored tarafından Florent Xicluna's avatar Florent Xicluna

Add a link on maketrans().

üst 40f09c07
...@@ -1220,9 +1220,9 @@ string functions based on regular expressions. ...@@ -1220,9 +1220,9 @@ string functions based on regular expressions.
mapped through the given translation table, which must be a string of length mapped through the given translation table, which must be a string of length
256. 256.
You can use the :func:`maketrans` helper function in the :mod:`string` module to You can use the :func:`~string.maketrans` helper function in the :mod:`string`
create a translation table. For string objects, set the *table* argument to module to create a translation table. For string objects, set the *table*
``None`` for translations that only delete characters: argument to ``None`` for translations that only delete characters:
>>> 'read this short text'.translate(None, 'aeiou') >>> 'read this short text'.translate(None, 'aeiou')
'rd ths shrt txt' 'rd ths shrt txt'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment