Source:
import re

def is_email_valid(email):
    return re.match("^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,4}$", email) is not None

Checks weather an email is valid email or not.

Pythoneer 6 years ago