how i validated the given gmail is correct or not.
update processing
def verify_Gmail(Gmail):
i=0
while i<len(Gmail):
current=Gmail[i]
i+=1
if current>="a" and current<="z":
continue;
elif current>="A" and current<="Z":
continue;
elif current>="0" and current<="9":
continue;
elif current=="@" or current=="." or current=="_":
continue;
else:
return False
if Gmail[-10:]=="@gmail.com":
return True
else:
return False
if verify_Gmail(input("Enter Your Gmail :")):
print("valid")
else:
print("invalid")
Top comments (0)