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 09e72cf commit d133f26Copy full SHA for d133f26
Doc/library/stdtypes.rst
@@ -1850,12 +1850,15 @@ expression support in the :mod:`re` module).
1850
(``\n``) or return (``\r``), it is copied and the current column is reset to
1851
zero. Any other character is copied unchanged and the current column is
1852
incremented by one regardless of how the character is represented when
1853
- printed.
+ printed. For example::
1854
1855
>>> '01\t012\t0123\t01234'.expandtabs()
1856
'01 012 0123 01234'
1857
>>> '01\t012\t0123\t01234'.expandtabs(4)
1858
1859
+ >>> print('01\t012\n0123\t01234'.expandtabs(4))
1860
+ 01 012
1861
+ 0123 01234
1862
1863
1864
.. method:: str.find(sub[, start[, end]])
0 commit comments