Question: Python Telephone numbers in the US are formatted with a 3 digit area code in parentheses, followed by a 7 digit number with a hyphen:
Python
Telephone numbers in the US are formatted with a 3 digit area code in parentheses, followed by a 7 digit number with a hyphen: ex. "(123) 456-7890". Write a regular expression that will accept any string that matches a valid phone number format, and reject any invalid phone number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
