Created
January 18, 2020 01:13
-
-
Save yosefsadek/b65a688de3f5fbbe81e0d247b4da60c5 to your computer and use it in GitHub Desktop.
py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
password = input("Enter an email address: ") | |
while len(password)==0: | |
password = input("Enter an email address: ") | |
pattern = "^[A-Za-z0-9]+\@[A-Za-z0-9]+\.[A-Za-z0-9]+$" | |
passwordMatch = re.match(pattern, password) | |
if passwordMatch: | |
print("VALID") | |
else: | |
print("INVALID") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment