Question: Exercise 1 ( 2 points ) . Write a function parse _ email that, given an email address s , returns a tuple, ( user

Exercise 1(2 points). 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').
Your 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. See the test cases for examples.Exercise 1(2 points). 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').
Your 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. See the test cases for examples.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!