Skip to content

Instantly share code, notes, and snippets.

@StickmanNinja
Created April 7, 2020 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StickmanNinja/a77f2053cb76eb3cbbbde7a019ddde0c to your computer and use it in GitHub Desktop.
Save StickmanNinja/a77f2053cb76eb3cbbbde7a019ddde0c to your computer and use it in GitHub Desktop.
A simple script to sort emails in a list.
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