Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Complete the function file_split in the t07_functions.py module, and complete the testing code for the function in t07.py. file_split reads from an input file and

image text in transcribed

Complete the function file_split in the t07_functions.py module, and complete the testing code for the function in t07.py.

file_split reads from an input file and copies the contents of that file into two output files. Lines containing digits are copied to one output file, lines without digits are copied to the second output file, and empty lines are ignored.

The sample file source.txt contains:

As easy as 123! No numbers here. We're Number 1! Got no digits. 6 of one, 1/2 dozen of another. I am not a number, I am a free man! Got my BFG9000. 

which is split into two files, the first containing lines with digits:

As easy as 123! We're Number 1! 6 of one, 1/2 dozen of another. Got my BFG9000. 

and the second lines without digits:

No numbers here. Got no digits. I am not a number, I am a free man! 

Complete the testing for file_split in the t07.py module by working with the appropriate files and calling the function. The names of the output files are up to you.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Outlook 2023

Authors: James Holler

1st Edition

B0BP9P1VWJ, 979-8367217322

More Books

Students also viewed these Databases questions

Question

7. Understand the challenges of multilingualism.

Answered: 1 week ago

Question

5. Give examples of variations in contextual rules.

Answered: 1 week ago