Thesplit() method splits h "string" into a lfst of stringo based on the occurrences of ahe compiled regular expression to which the string is being compared. The portions of the string that don't match are returned as a list of strings.
split ()'s arguments are
• string— the stringto searchin
• maxsplit — the maximum numben of splits to make (the default is 0) Here's an example:
>>> alist = cre.split("OS=Linux:Browser=Netscape:WM=Afterstep")
The output is
Was this article helpful?