I need to write a function parse_email that, given an email address s, returns a tuple, (user-id, domain) corresponding to the user name and domain name. For instance, given richie@cc.gatech.edu it should return (richie, cc.gatech.edu). The function should parse the email only if it exactly matches the email specification. For example, if there are leading or trailing spaces, the function should not match those. Also, the start of the function should be an alphabet as well as the end. In case it is not an alphabet, it should get an error as well as if the string contains any space. I tried the following function: def parse_email (s): """Parses a string as an email address, returning an (id, domain) pair.""" try: return(re.match(r'\S([\w\.+_-]+)@([\w\._-]+)',s).groups()) except: pass Can someone help me in completing the function where if there are spaces in the start of the string, it gives an error. def parse_email (s): try: return(re.match(r'\S([\w\.+_-]+)@([\w\._-]+)',s).groups()) except: pass Continue reading...