This project was created for Task 3 of the CodeAlpha Python Internship program
It automates the process of extracting all email addresses from a .txt file and saves them to a new file
Automate a small, real-life repetitive task using Python
Chosen Task:
✔ Extract all email addresses from a .txt file and save them to another file
re– Regular Expressions (for finding email patterns)file handling– Reading input and writing outputset()– To remove duplicate emails
- Asks the user to enter the name of a
.txtfile. - Uses a
regular expressionto search for valid email addresses - Removes duplicates
- Saves the cleaned list of emails to
emails_found.txt - Handles missing files with a message instead of crashing
"contacts.txt"
For it to run you must place the .txt file in the same folder as this python script