Question: 
Write a function to check if the string is a valid email address or not using regex.


Model's Code:
import re

def check_email(email):
    pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
    if re.match(pattern, email):
        return 'Valid Email'
    else:
        return 'Invalid Email'



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


Asserts:
assert check_email("ankitrai326@gmail.com") == 'Valid Email'
assert check_email("my.ownsite@ourearth.org") == 'Valid Email'
assert check_email("ankitaoie326.com") == 'Invalid Email'


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 774 of 974: 586/774 (75.71059431524549%): success