Question: Hello. I need help making these functions in Python. A function named check_number that takes a string parameter. The function will return true if the
Hello. I need help making these functions in Python.
- A function named check_number that takes a string parameter. The function will return true if the string consists of exactly a phone number in either the form xxx-xxxx or the form (xxx) xxx-xxxx. Yes, there is a space between the ) and the following number.
- Write code that reads a file name data.txt and writes to a file phones.txt only those lines from data.txt that are phone numbers. A line that contains a phone number and other things should not end up in phones.txt. Make sure you use your check_number function.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
