Validate give string is valid email address.
- Define function 'validate_email' which will accept string as argument.
- String should not be null.
- Use regexp to validate email.
- Use keyword pattern to define regex pattern.
- Function should pass all test cases.
Instructions:
-
Program should be written in file build.py
-
Function name should be validate_email.
-
Input
Type: String Value: [email protected]
-
Expected Output
Type: Boolean Value: True