You are viewing a single comment's thread. Return to all comments →
import re import email.utils as email n = int(input()) r = re.compile(r'^[a-z](\w|-|\.)*@[a-z]+\.[a-z]{1,3}$') for i in range(n): name,mail = email.parseaddr(input()) if r.match(mail): print(email.formataddr((name,mail)))
Seems like cookies are disabled on this browser, please enable them to open this website
Validating and Parsing Email Addresses
You are viewing a single comment's thread. Return to all comments →