We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
str.expandtabs()
1 parent 46e7ed7 commit a9db299Copy full SHA for a9db299
Doc/library/stdtypes.rst
@@ -1891,12 +1891,15 @@ expression support in the :mod:`re` module).
1891
(``\n``) or return (``\r``), it is copied and the current column is reset to
1892
zero. Any other character is copied unchanged and the current column is
1893
incremented by one regardless of how the character is represented when
1894
- printed.
+ printed. For example::
1895
1896
>>> '01\t012\t0123\t01234'.expandtabs()
1897
'01 012 0123 01234'
1898
>>> '01\t012\t0123\t01234'.expandtabs(4)
1899
1900
+ >>> print('01\t012\n0123\t01234'.expandtabs(4))
1901
+ 01 012
1902
+ 0123 01234
1903
1904
1905
.. method:: str.find(sub[, start[, end]])
0 commit comments