Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. import re
  2.  
  3. str = "Tom is happy and Jane is happy too"
  4. x = re.sub("^h...y$","[Emotion removed]",str)
  5. print (x)
  6.  
  7. import re
  8.  
  9. str = "Tom is happy and Jane is happy too"
  10. x = re.sub("h...y","[Emotion remove]",str)
  11. print (x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement