Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with Python 2X, the assignment is to write a program that reads through the mail box data and when you find a

I need help with Python 2X, the assignment is to write a program that reads through the mail box data and when you find a line that starts with From, extract the address information from the line. Count the number of messages from each person by using a dictionary. Note that you might need to look at more than From because of duplicate instances of the address (hint: From vs. From:). Otherwise, embedded email thread histories may cause your count to be incorrect. After all of the data has been read, print (i.e., print) the address of the person with the highest number of messages, along with the number of messages of that person. To do this, create a list of tuples (count, email) from the dictionary, sort the list in reverse order and print out the person who has the highest number of messages.

I need it to read through a file that has email data with the file in the link: http://www.py4inf.com/code/mbox.txt,

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

What is meant by the term variance? AppendixLO1

Answered: 1 week ago