Answered step by step
Verified Expert Solution
Question
1 Approved Answer
def file _ split ( f _ in , f _ digits, f _ no _ digits ) : - - -
def filesplitfin fdigits, fnodigits:
Copies the contents of fin to fdigits and fnodigits depending
on the contents of fin:
Lines containing digits are copied to fdigits.
Lines without digits are copied to fnodigits.
Empty lines are ignored.
Use: filesplitfin fdigits, fnodigits
Parameters:
fin source file file handle already open for reading
fdigits file to contain lines with digits from fin file handle
already open for writing
fnodigits file to contain nonempty lines without digits from fn
file handle already open for writing
Returns:
None
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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