Skip to content

Instantly share code, notes, and snippets.

@StickmanNinja
Last active April 13, 2020 14:12
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/f7ee4fae1eb34a9e8804eb9b72a7d118 to your computer and use it in GitHub Desktop.
Save StickmanNinja/f7ee4fae1eb34a9e8804eb9b72a7d118 to your computer and use it in GitHub Desktop.
A simple tool I use to sort emails by ISP.
import re
import json
gmail = 0
yahoo = 0
comcast = 0
with open('newsegment.csv') as f:
lines = f.readlines()
isps = {}
for email in lines:
email = email.lower()
if "gmail" in email and gmail < 500:
gmail = gmail + 1
print(email)
if "yahoo" in email and yahoo < 0:
pass
if "comcast" in email and comcast < 0:
pass
if "hotmail" in email:
pass
if "aol" in email:
pass
if "aol" not in email and "hotmail" not in email and "comcast" not in email and "yahoo" not in email:
print(email)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment