Home > other > Python why does it feel the split instead of take out punctuation and inexplicably omitted the sorte
Python why does it feel the split instead of take out punctuation and inexplicably omitted the sorte
Time:09-23
CodePudding user response:
Split () by specifying a separator to slice of string, if the parameter num has a specified value, the separated num + 1 is the string The split () syntax is: STR. The split (STR="", num=string. Count (STR)). STR, separator, the default for all empty characters, including Spaces, newlines (\ n), the tabs (\ t), Num - number of segmentation, the default value is 1, the space all,
Punctuation marks don't know what you said is which, because don't know you what is the content of the text of the document, but if you're going to specify which punctuation, should be fill in the corresponding parameter