Question: What would the output of the program regtest.py be if it was given the input file addresses.txt (below). regtest.py import re addressRegex = re.compile(r'''(

What would the output of the program regtest.py be if it was given the input file addresses.txt (below). Provide code for changes that would be required for regtest.py to completely and specifically match each of

What would the output of the program regtest.py be if it was given the input file addresses.txt (below). regtest.py import re addressRegex = re.compile(r'''( (\d{2}) \s (\w+) )'', re. VERBOSE) fileobj open ('addresses.txt') data = fileobj. readlines () for address in data: Answer: address address. strip () mo if mo: addressRegex.search (address) print ('Found: '+mo.group () ) addresses.txt 30 Python St, Jupyter, 2001 300 Python St, Jupyter Springs, 2010 3 Python St, Jupyter, 2010 30 Python Street, Jupyter, 2001 30a Python Street, Jupyter, 2001 3 Python Package Index, Jupyter, 2010 Provide code for changes that would be required for regtest.py to completely and specifically match each of the part of the address (number, street, suburb and postcode) as given in the input file.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Answer Here is a corrected version of the code import re add... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!