Question: Exercise 7 . 2 - Extract domain name Define a function to extract the domain name from an email address. Domain name is the part
Exercise Extract domain name
Define a function to extract the domain name from an email address.
Domain name is the part after @ sign.
Writertest code to ask user for an email and print out the domain name
Sample output:
Enter an email address enter exit to quit : john
Domain is: Domain not found
Enter an email address enter exit to quit :
john.smith@missioncollege.edu
Domain is:
missioncollege.edu
Enter an email address enter exit to quit :
jane.smith@sjsu.edu
Domain is:
sjsu.edu
Enter an email address enter exit to quit : exit
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
