top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

Email Address Verifier: @ symbol checker

NaumanKhanKhattak

The email address format is one which must have some unique user name before @ and also have a domain name after that. In this very simple mini python project we are going to check whether there is any @ symbol before domain name. The objective is how we access a string characters and check them for some specific character at desired location.


Step: 1

Typing the below code in your jupyter notebook or any other python IDE. It is simply getting the email address from input.


e_address=input("Enter any Email address:")
print(e_address)

Step: 2

In the second we will check the input character by character to check the location of @ symbol.



verified=False
count=0
for i in range(len(e_address)):
    print(e_address[i])
    if (e_address[i]=='@')& ((i >0)&(i< len(e_address)-1)):
        verified=True

In above lines of code we are iterating the loop over e_address variable and then in the if statement we have given the condition to check if the @ symbol is some where not at the ends of the given input email address.


Step: 3

In the last step we are just giving the message whether it is an email address or not with the following lines of code.


if verified:
    print("looks like you have typed some email addree.")
else:
    print("That's not an email address.")

Conclusion:

Although this is a very naive solution for email address @ checker but the learned concept of accessing string characters and the if statements can further be used in a same way to enhance and add an extra functionality. For example to check if the domain name and user name is valid or not.




0 comments

Recent Posts

See All

Коментарі


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