1.

Write a program that reads email id of a person in the form of a string and ensures that it belongs to domain @gmail.com. 

Answer»

email = raw_input (“Enter email ID :”) 

domain = “@gmail.com” 

lendo = len(domain) 

lenm = len(email) 

sub = email [lenm – lendo:]

if sub = = domain : 

if lendo ! = lenm : 

print “It is a valid email ID” 

else :

print “It is an invalid email ID” 

else : 

print “It’s domain is different”



Discussion

No Comment Found