Last active
May 5, 2022 18:14
-
-
Save YiLi225/97221bd2ee84689d81ebc6880cb82642 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
# curText = doc_set[122001] | |
curText = ''' | |
six months ago we thought it would be a fun idea to release our album on election day but this is not the election to be cute . | |
we felt as though rather than making a commentary we were only riding the wave of the election . this seemed less and less like what we | |
intended to do and more of a gimmick . | |
''' | |
## Replace the words 'day', 'we', 'is' | |
print(' '.join(re.sub(r'|'.join(map(re.escape, ['day', 'we', 'is'])), ' ', curText).split())) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment