Python Project - Churn Emails

7 / 7

Python Project - Churn Emails - Count Number of Messages From Each Domain

Write a function count_message_from_domain which reads the file /cxldata/datasets/project/mbox-short.txt.

This function builds a histogram using a dictionary to count how many messages have come from each domain(Instead of from email address), and returns the dictionary.

If your logic is correct then your function should return below dictionary

{'': 6,
 '': 4,
 '': 7,
 '': 8,
 '': 1,
 '': 1}

You can use "Hint" and "See Answer" if you are stuck.

Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...