There are some operational functions for the strings as given below:-1.) split() :-The split() function is used to split(breaks up) at a specified separator and returns a list of strings.
Syntax
string.split(separator,maxsplit)
The split function takes maximum two parameters as given below:-
- Separator:-This is an optional parameter.If separator is specified ,the string split at this specified separator.If separator is not specified ,the string is split at white space (space,newline,coma etc.) separator.
- maxsplit:-This is also an optional parameter.The maxsplit is used to define maximum number of splits. The default value of max split is -1 ,means no limit of number of splits.
3