Python Validate Email Address

[Solved] Python Validate Email Address | Python - Code Explorer | yomemimo.com
Question : python library to validate email address

Answered by : shailesh-yadav-t3sx3310jbsb

pip install email-validator

Source : https://pypi.org/project/email-validator/ | Last Update : Thu, 01 Dec 22

Question : validate email in python

Answered by : you

import re
def validate_email(email): pattern = r'^[\w\.-]+@[\w\.-]+\.\w+$' if re.match(pattern, email): return True return False
email = input("Enter an email address: ")
if validate_email(email): print("Email is valid")
else: print("Email is invalid")

Source : | Last Update : Tue, 19 Sep 23

Answers related to python validate email address

Code Explorer Popular Question For Python