Skip to content

Instantly share code, notes, and snippets.

View timofei7's full-sized avatar

Tim Tregubov timofei7

View GitHub Profile
@timofei7
timofei7 / format_email.py
Created March 29, 2017 01:27 — forked from jason-feng/format_email.py
Formats emails nicely for slack
## Turns list of dartmouth emails into formatted emails with first and last name
f = open("names.txt")
o = open("names_edit.txt", 'w')
for email in f.readlines():
email = email.strip()
email = email[:-1] # Remove semicolon
bracket_email = "<" + email + ">" # Now its like <[email protected]>
at_index = email.rfind("@")
name = email[0:at_index-3] # get just the jason.s.feng