Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Answer Here is a corrected version of the code import re add...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started