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). 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
Answer Here is a corrected version of the code import re add... View full answer
Get step-by-step solutions from verified subject matter experts
