Counting Organizations
This application will read the mailbox data (mbox.txt) count up the number email messages per organization (i.e. domain name of the email address) using a database with the following schema to maintain the counts.
CREATE TABLE Counts (org TEXT, count INTEGER)
If you run the program multiple times in testing or with dfferent files, make sure to empty out the data before each run.
The data file for this application: http://www.pythonlearn.com/code/mbox.txt.
The program can be speeded up greatly by moving the commit operation outside of the loop.