Guest User

Untitled

a guest
May 25th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. da = "abc.com"
  2. print(da.strip(".com"))
  3.  
  4. import re
  5. da = "abc.com"
  6. print(re.sub(".com", "", da))
  7.  
  8. print(da.replace(".com", ""))
  9.  
  10. abc
  11.  
  12. print(da.split('.')[0])
  13.  
  14. print(da.split('.')[:-1])
Add Comment
Please, Sign In to add comment