Created
April 7, 2020 13:15
-
-
Save StickmanNinja/a77f2053cb76eb3cbbbde7a019ddde0c to your computer and use it in GitHub Desktop.
A simple script to sort emails in a list.
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
with open('emaillist.txt') as f: | |
lines = f.readlines() | |
yahoo = 0 | |
hotmail = 0 | |
google = 0 | |
for email in lines: | |
if "gmail" not in email and "aol" not in email and "GMAIL" not in email and "AOL" not in email and "hotmail" not in email: | |
print(email) | |
if "yahoo" in email: | |
yahoo = yahoo + 1 | |
else: | |
if "gmail" in email or "GMAIL" in email: | |
if google < 200: | |
print(google) | |
google = google + 1 | |
pass | |
print("Number of yahoo users: " + str(yahoo)) | |
print("Number of google users: " + str(google)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment