Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
395 B
3
Indexable
Never
import re

valid_count=0
invalid_count=0

f=open("emailadresses","r")


for x in f:
 email_list = re.search("\w*@gmail[.]com",x)
 if email_list!=None:
  #print("valid Email id")
  valid_count=valid_count+1

 else:
  #print("Inavlid Email id")
  invalid_count=invalid_count+1

print("Valid email id is :",valid_count)
print("Invalid email id is :",invalid_count)
f.close()
Leave a Comment