import re pattern = re.compile("\w.?\w+@\w[.\w+]")
good_email = filter(lambda x: pattern.search(x), emails)
good_email = filter(lambda x: pattern.match(x), emails)