Daily Python Projects

Daily Python Projects

Check if email is valid with Python

Level: Beginner

Ardit Sulce's avatar
Ardit Sulce
Dec 09, 2025
∙ Paid

Your task for today is to create a command-line email validator that checks if email addresses follow the correct format, helping you learn pattern matching and string validation.

Project Task

Create an email validator that:

  • Takes email addresses as input from the user

  • Uses the re (regular expressions) library to validate email format

  • Checks for proper email structure (username@domain.extension)

  • Displays whether each email is valid or invalid

  • Allows users to validate multiple emails in one session

  • Provides clear feedback on validation results

  • Uses a simple regex pattern to match valid email formats

This project gives you hands-on practice with regular expressions, string validation, and input handling — essential skills for data validation and form processing.

Expected Output

Email Validator
===============

Enter an email address (or ‘quit’ to exit): john.doe@example.com
✓ Valid email: john.doe@example.com

Enter an email address (or ‘quit’ to exit): invalid-email@
✗ Invalid email: invalid-email@

Enter an email address (or ‘quit’ to exit): user@domain.co.uk
✓ Valid email: user@domain.co.uk

Enter an email address (or ‘quit’ to exit): @nodomain.com
✗ Invalid email: @nodomain.com

Enter an email address (or ‘quit’ to exit): test.user@company.org
✓ Valid email: test.user@company.org

Enter an email address (or ‘quit’ to exit): quit

Thank you for using Email Validator!

Join the Python & AI Builders Skool Community

Got questions to ask the author about this project? Join our Python & AI Builders community for weekly Python & AI videos and discussions:

https://skool.com/automateit

Skeleton and Solution

Below you will find both a downloadable skeleton.py file to help you code the project with comment guides and the downloadable solution.py file containing the correct solution.

Get the code skeleton here:

Keep reading with a 7-day free trial

Subscribe to Daily Python Projects to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Ardit Sulce · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture