Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
307 B
3
Indexable
Never
name = input("Enter file:")
if len(name) < 1:
    name = "mbox-short.txt"
handle = open(name)
count = dict()
emails = []
for words in handle:
    words = words.rstrip()
    if not words.startswith('From '): continue
    words = words.split()
    email = words[1]
    emails = emails.append(email)