Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
20,619
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. print(test2) # name@gmail.com
  2. print(parts[0]) # @gmail
  3.  
  4. print(parts[0] in test2)
  5. print(re.search(parts[0], test2))
  6. print(test2.rfind(parts[0]))
  7.  
  8. name@gmail.com
  9. @gmail
  10.  
  11. False
  12. None
  13. -1
  14.  
  15. parts = ["@gmail", "@cngmail.", "google", "hotmail",...]
  16.  
  17. test = "name@gmail.com, "
  18. test2 = test.replace(" ","").replace(",","")
  19. #cut-off comma and whitespaces at the end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement