Question: Need python code for below problem in Strings ---------------------------------------- Every employee of the Gocargo carriers are asked to update their email ids for communication purposes.
Need python code for below problem in Strings
----------------------------------------
Every employee of the Gocargo carriers are asked to update their email ids for communication purposes. The employees tend to give in email ids that are not in the proper format. Can you please help the IT team in validating the email ids of the employees? There are set of rules for the email ids to get validated. The format of the email id is given below username@domain.TLD where, TLD - Top Level Domain Business rules: Rule1: Top level domain should be ".com" or ".in" or ".edu" Rule2: domain name should have more than 3 characters Rule3: username should be alphabets, numberical, special characters The special characters allowed are (. , _ , - ). Should contain only lower-case characters. Should not start or end with special character. Input Format : Input is a string, the email id of the employee. Output Format: Output is a string, that prints "Valid" if the email id is valid, else prints "Invalid" followed by the violated rule numbers separated by new-line. Sample Input 1: _akshay@rosho.org Sample Output 1: Invalid 1 3 Sample Input 2: aks_hay@rosho.com Sample Output 2: Valid
-------------------
Thanks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
