Last active
July 18, 2018 13:41
-
-
Save benjohnde/6164ba9452a035b006af7a45bd0a3cc8 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
| #!/usr/bin/env python3 | |
| import csv | |
| import re | |
| with open('customer_interview_list.csv') as file: | |
| reader = csv.reader(file, delimiter=';') | |
| for row in reader: | |
| column = row[13] | |
| column = column.strip() # remove unnecessary whitespace | |
| if not column: continue | |
| emails = re.findall(r'[\w\.-]+@[\w\.-]+\.[\w]+', column) | |
| if not emails: continue | |
| emails = list(set(emails)) # removes duplicates because a set is supposed to have unique entries | |
| print("E-Mails Found: {}".format(emails)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment