-
Notifications
You must be signed in to change notification settings - Fork 0
/
emailvaliddation2.py
37 lines (36 loc) · 1.17 KB
/
emailvaliddation2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# [email protected] minimum 6 charecters
# first charecter not number
# @ charecter in email and count of @ must be 1
# position of "." -3 or -4 index
# search space -- if space found wrong
# charecter must not be uppercase
email = input("Enter Your Email : ")
k, j, d = 0, 0, 0
if len(email) >= 6:
if email[0].isalpha():
if ("@" in email) and (email.count("@") == 1):
if (email[-4] == ".") ^ (email[-3] == "."):
for i in email:
if i == i.isspace():
k = 1
elif i.isalpha():
if i == i.upper():
j = 1
elif i.isdigit():
continue
elif i == "_" or i == "." or i == "@":
continue
else:
d = 1
if k == 1 or j == 1 or d == 1:
print("Wrong Email 5")
else:
print("Right Email")
else:
print("Wrong Email 4")
else:
print("Wrong Email 3")
else:
print("Wrong Email 2")
else:
print("Wrong Email 1")