hw11: Midshipman email addresses
- Due before the beginning of class on Monday, February 3
Your task
Write a Python program emails.py which inputs a filename and then searches for and
prints out the email addresses of all current USNA Midshipmen in the
file. Current means classes 2025-28.
You will want to use the re module for regular expressions, and the
findall function (documentation
here).
Sample run
Here is an example file for testing: msg.txt
Here is how your program should work with this file (blue text is what your program should print, green text is what someone would type in):
roche@ubuntu$python3 emails.pyfilename:msg.txtm273481@usna.edum257855@usna.edum281234@usna.edum280417@usna.edum274427@usna.edum266745@usna.edum253227@usna.edu
Submit command
To submit files for this homework, run one of these commands:
submit -c=sd212 -p=hw11 emails.py
club -csd212 -phw11 emails.py