Untitled

 avatar
unknown
plain_text
2 years ago
976 B
6
Indexable
#Email Validation:

1.import re module
2.take the i/p from user as a email-id
3.made one pattern 
4.use search() to check that pattern with user input(email-id)
  and store this result in one variable.
5.if that variable is not None ,then it is valid email-id else it is invalid email-id

------------------------------------------------------

#Counting of valid and invalid email-id:

1.One file is created and store all email-id (valid and invalid email-id) into that file.

2.import re module

3.declare 2 counter valid-counter and invalid-counter

4.open that file in read mode.

5.use for loop to check email-id one by one from that file.

6.declare 1 variable inside that we use search() to match pattern with that email-id.

7.if that variable is not None then it is valid email-id and valid-counter increamented by 1

8.else it is invalid email-id and invalid-counter is increamented by 1.

9.Print both valid-counter and invalid-counter.
Editor is loading...
Leave a Comment