Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string.split(text)
- text.split()
- >>> import string
- >>> help(string.split)
- Help on function split in module string:
- split(s, sep=None, maxsplit=-1)
- split(s [,sep [,maxsplit]]) -> list of strings
- Return a list of the words in the string s, using sep as the
- delimiter string. If maxsplit is given, splits at no more than
- maxsplit places (resulting in at most maxsplit+1 words). If sep
- is not specified or is None, any whitespace string is a separator.
- (split and splitfields are synonymous)
- >>> help("".split)
- Help on built-in function split:
- split(...)
- S.split([sep [,maxsplit]]) -> list of strings
- Return a list of the words in the string S, using sep as the
- delimiter string. If maxsplit is given, at most maxsplit
- splits are done. If sep is not specified or is None, any
- whitespace string is a separator.
- 'a b c'.split()
- str.split('a b c')
- # both return ['a', 'b', 'c']
Add Comment
Please, Sign In to add comment