def is_valid ( email ) : if isinstance ( email , basestring ) and EMAIL_RE . match ( email ) : return True return False
how can i validate email syntax in python
Email address validation method .
def is_valid(email):
        """Email address validation method.

        :param email: Email address to be saved.
        :type email: basestring
        :returns: True if email address is correct, False otherwise.
        :rtype: bool
        """
        if isinstance(email, basestring) and EMAIL_RE.match(email):
            return True
        return False