Manavalan1

Untitled

Dec 23rd, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. import re
  2.  
  3. data = '''loltukku [email protected] vandu [email protected]
  4. list_user = data.split()
  5. gmail_user = ['Gmail User:',]
  6. hotmail_user = ['Hotmail User:']
  7.  
  8. for email in list_user:
  9.     if re.search(r'\w+@gmail.\w+', email):
  10.         gmail_user.append(email)
  11.     elif re.search(r'\w+@hotmail.\w+', email):
  12.         hotmail_user.append(email)
  13.  
  14. gmail_user.append('')
  15. for i in gmail_user,hotmail_user:
  16.     for j in i:
  17.         print (j)
Add Comment
Please, Sign In to add comment