top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

Email Splitter App for Separating Username from Domain Name



Introduction:

Mail has become an integral part of our daily lives. But how do these email addresses work, and what sequence do the domains maintain?


The general format of an email address is example@gmail.com

To distinguish email addresses, we must first fully understand the parts of the address. There username part which appear at the begining of adress, before '@' sign. After that, there is a domain part, the name of which depends on the company that owns the Mail we use.

Code and It's Explanation

Get username and domain

Initially, we get the mail address as input. In the second stage, we split down the value we have. And print the result.


Here we will use 're', which is python's library for regular expression. Again, we will get the mail address as input. And we will encode the sequence of letters and characters in regex according to the order of the valid mail. Let's define mail_check function for checking is given mail adress valid or not.


In this stage we create Capitalize function which first check is email valid after that, it splits string in term of name, username and domain part. First we split adress by '@' symbol, in the next stage we do the same operation again by '.' symbol for geting to Name and Surname.

We use map() function for capitalize the strings

Conculusion:

We have developed an app that separates inclined usernames and domains, as well as checks whether the given address is valid or not. If you want to see all the codes together, you can use this link:

 
 
 

Comments


COURSES, PROGRAMS & CERTIFICATIONS

 

Advanced Business Analytics Specialization

Applied Data Science with Python (University of Michigan)

Data Analyst Professional Certificate (IBM)

Data Science Professional Certificate (IBM)

Data Science Specialization (John Hopkins University)

Data Science with Python Certification Training 

Data Scientist Career Path

Data Scientist Nano Degree Program

Data Scientist Program

Deep Learning Specialization

Machine Learning Course (Andrew Ng @ Stanford)

Machine Learning, Data Science and Deep Learning

Machine Learning Specialization (University of Washington)

Master Python for Data Science

Mathematics for Machine Learning (Imperial College London)

Programming with Python

Python for Everybody Specialization (University of Michigan)

Python Machine Learning Certification Training

Reinforcement Learning Specialization (University of Alberta)

Join our mailing list

Data Insight participates in affiliate programs and may sometimes get a commission through purchases made through our links without any additional cost to our visitors.

bottom of page