hw11: Midshipman email addresses
- Due before the beginning of class on Friday, 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.
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.txtm253481@usna.edum237855@usna.edum261234@usna.edum260417@usna.edum254427@usna.edum246745@usna.edum233227@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