-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmailstring.py
35 lines (33 loc) · 1.19 KB
/
mailstring.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
email = input("Enter Your Email: ")
i=0
j=0
k=0
if len(email) >= 6:
if email[0].isalpha():
if ("@" in email) and (email.count("@") == 1):
if (email[-4] == ".") ^ (email[-3] == "."):
for mail in email:
if mail == mail.isspace():
i = 1
elif mail.isalpha():
if mail == mail.upper():
j = 1
elif mail.isdigit():
continue
elif mail == "_" or mail == "." or mail == "@":
continue
else:
k = 1
if i == 1 or j == 1 or k == 1:
print(
"Wrong Email: You might have spaces or other condition not correct")
else:
print("Email Validated!")
else:
print("Wrong Email: Check email and type again")
else:
print("Wrong Email: Check email and type again")
else:
print("Wrong Email: Check email and type again")
else:
print("Wrong Email: Check email and type again")