I am a very new dragon
If there are repeated words, then I want to change the sentence.
Correct I am currently using this reg. But there are so many changes on this letter. East. "My friend and I am happy" - & gt; "My friend and happy" (this removes "i" and space) error How do I make the same change but check the words instead of the letters?
text = re.sub (r '(\ w +) \ 1', 'r' 1 'text) Duplicated words in the # line
text = re.sub (r '\ b (\ w +) (\ 1 \ B) + Duplicated words #remove
\ b in the line '+', r '\ 1', text) matches the empty string, but Only the beginning or the end of a word
No comments:
Post a Comment