SHARE
TWEET

Untitled

Manavalan1 Dec 23rd, 2017 20 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import re
  2.  
  3. data = '''loltukku loltukku_pandi@gmail.com vandu vandumurgan@hotmail.com
  4. kattu katuupuchi@gmail.com pandi powerpandi@gmail.com powerpandi@hotmail.com'''
  5. list_user = data.split()
  6. gmail_user = ['Gmail User:',]
  7. hotmail_user = ['Hotmail User:']
  8.  
  9. for email in list_user:
  10.     if re.search(r'\w+@gmail.\w+', email):
  11.         gmail_user.append(email)
  12.     elif re.search(r'\w+@hotmail.\w+', email):
  13.         hotmail_user.append(email)
  14.  
  15. gmail_user.append('')
  16. for i in gmail_user,hotmail_user:
  17.     for j in i:
  18.         print (j)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top