Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- str = "Tom is happy and Jane is happy too"
- x = re.sub("^h...y$","[Emotion removed]",str)
- print (x)
- import re
- str = "Tom is happy and Jane is happy too"
- x = re.sub("h...y","[Emotion remove]",str)
- print (x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement