Last active
March 21, 2020 21:51
-
-
Save md2perpe/9272491282d32069d9db663811bc3166 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
################ | |
known_domains = { | |
"hotmail.com": [], | |
"gmail.com": [], | |
"yahoo.com": [], | |
"mail.ru": [], | |
} | |
notfound = [] | |
################ | |
print("Enter five emails to test!") | |
for i in range(5): | |
data = raw_input("mail: ") | |
mail = data.lower() | |
domain = data.split("@")[1] | |
if domain in known_domains: | |
known_domains[domain].append(mail) | |
print "Domain '%s'" % domain | |
else: | |
notfound.append(mail) | |
print "Domain not found" | |
print "" | |
print "Gmail:", known_domains["gmail.com"] | |
print "Hotmail:", known_domains["hotmail.com"] | |
print "Yahoo:", known_domains["yahoo.com"] | |
print "Mail.ru:", known_domains["mail.ru"] | |
print "Not found:", notfound | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment