March 2003
Intermediate to advanced
656 pages
39h 30m
English
split
s.split(sep=None,maxsplit=sys.maxint)Returns a list L of up to
maxsplit
+1 strings.
Each item of L is a
“word” from
s, where string
sep separates words. When
s has more than
maxsplit words, the last item of
L is the substring of s
that follows the first maxsplit words.
When sep is None, any
string of whitespace separates words (e.g., 'four
score
and
seven
years
ago'.split(None,3) is ['four',
'score', 'and',
'seven
years
ago']).