It will break or Split the string at the specified separator and return a list of strings.
#separator- (Optional) Separator value at which
split should occur in the given string
#maxsplit- (Optional) Maximum number of splits that should occur in String.
By default there is no limit in number of split.
str1 = "Python is a cross-platform object-oriented general-purpose
, high-level programming language"
['Python', 'is', 'a', 'cross-platform', 'object-oriented', 'general-purpose,',
'high-level', 'programming', 'language']
['Python is a cross', 'platform object', 'oriented general', 'purpose, high',
'level programming language']
['Python is a cross', 'platform object', 'oriented general-purpose,
high-level programming language']
Best learning portal that provides you great learning experience of various technologies with modern compilation tools and technique
Don't hesitate to give us a call or send us a contact form message