Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- data = '''loltukku [email protected] vandu [email protected]
- kattu [email protected] pandi [email protected] [email protected]'''
- list_user = data.split()
- gmail_user = ['Gmail User:',]
- hotmail_user = ['Hotmail User:']
- for email in list_user:
- if re.search(r'\w+@gmail.\w+', email):
- gmail_user.append(email)
- elif re.search(r'\w+@hotmail.\w+', email):
- hotmail_user.append(email)
- gmail_user.append('')
- for i in gmail_user,hotmail_user:
- for j in i:
- print (j)
Add Comment
Please, Sign In to add comment