Question: What would the output of the program regtest.py be if it was given the input file accounts.txt (below). regtest.py accounts.txt import re phoneRegex =
What would the output of the program regtest.py be if it was given the input file accounts.txt (below). regtest.py accounts.txt import re phoneRegex = re.compile(r""( (\(\0{6}\)) (\$|\-) (\d{7}) )"", re.VERBOSE) fileobj = open('accounts.txt') data = fileobj.readlines() for number in data: number = number.strip()) mo = phoneRegex.search(number) if mo: print(number + 'found' + mo.group())) 066-016-3345243 (066016) 3345243 066 - 016 3345243 (066-016) 3345243 066-016-334 - 5243 (066016) 33452435 (066016) - 33452435 306-065 - 123456789 (306065) 12345678 306-065 12345678 (306-065) 12345678 306-065 - 1234-5243 (306065) 123458 (306065) - 123458 j)
Step by Step Solution
3.36 Rating (168 Votes )
There are 3 Steps involved in it
It seems there is an issue with the regular ... View full answer
Get step-by-step solutions from verified subject matter experts
