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.
1 parent 4adb1dd commit b6299e8Copy full SHA for b6299e8
Doc/library/stdtypes.rst
@@ -2269,6 +2269,18 @@ expression support in the :mod:`re` module).
2269
>>> ' 1 2 3 '.split()
2270
['1', '2', '3']
2271
2272
+ If *sep* is not specified or is ``None`` and *maxsplit* is ``0``, only
2273
+ leading runs of consecutive whitespace are considered.
2274
+
2275
+ For example::
2276
2277
+ >>> "".split(None, 0)
2278
+ []
2279
+ >>> " ".split(None, 0)
2280
2281
+ >>> " foo ".split(maxsplit=0)
2282
+ ['foo ']
2283
2284
2285
.. index::
2286
single: universal newlines; str.splitlines method
0 commit comments