Write a Python program to validate an Email


Topic: Write a Python program to validate an Email

Solution

import re 
regex = '^[a-z0-9]+[\._]?[a-z0-9]+[@]\w+[.]\w{2,3}$'
def check(email):
  if(re.search(regex,email)):
    print("Valid Email")
  else:
    print("Invalid Email")
email = "ishwarraja@gmail.com"
check(email)



List all Python Programs