Write a function to check a valid email id


Topic: Write a function to check a valid email id

Solution

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



List all Python Programs