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 0430135 commit 6b9672cCopy full SHA for 6b9672c
Doc/library/stdtypes.rst
@@ -1755,12 +1755,15 @@ expression support in the :mod:`re` module).
1755
(``\n``) or return (``\r``), it is copied and the current column is reset to
1756
zero. Any other character is copied unchanged and the current column is
1757
incremented by one regardless of how the character is represented when
1758
- printed.
+ printed. For example::
1759
1760
>>> '01\t012\t0123\t01234'.expandtabs()
1761
'01 012 0123 01234'
1762
>>> '01\t012\t0123\t01234'.expandtabs(4)
1763
1764
+ >>> print('01\t012\n0123\t01234'.expandtabs(4))
1765
+ 01 012
1766
+ 0123 01234
1767
1768
1769
.. method:: str.find(sub[, start[, end]])
0 commit comments