Manavalan1 Dec 23rd, 2017 20 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import re
- data = '''loltukku email@example.com vandu firstname.lastname@example.org
- kattu email@example.com pandi firstname.lastname@example.org email@example.com'''
- 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):
- elif re.search(r'\w+@hotmail.\w+', email):
- for i in gmail_user,hotmail_user:
- for j in i:
- print (j)
RAW Paste Data