Question: Please CREATE the code and COMMENT the code in python. Thank you Please Note: You need to use try except block wherever the need arises
Please Note: You need to use try except block wherever the need arises for any of the following questions. You would also need to log the exceptions. 1. Your task is to write a function to print valid phone numbers. You need to accept the inputs from the file(inputl.txt) and output the valid phone numbers on the console. Format for valid phone numbers is: where x would be a number. Sample Input: input1.bxt Example: Input: 987-123-4567 123 456 7890 (123) 456-7890 Output: 987-123-4567 (123) 456-7890 Hint: You may use regular expressions. (import re)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
