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

CodePudding user response:

reference 1st floor moyac 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

Thanks to answer! Turned out to be only segmentation cannot be deleted
I said the punctuation is 23 line of output for the first time you see run results where the key is with an exclamation point keep punctuation
But after the sorting to output, there is no

CodePudding user response:

reference 1st floor moyac 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

Omg I just went to see the next like sorting after punctuation is also reserved

CodePudding user response:

reference 1st floor moyac 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

Embarrassing or have to re can realize the function of punctuation to replace
  • Related