Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

def file _ split ( f _ in , f _ digits, f _ no _ digits ) : - - -

def file_split(f_in, f_digits, f_no_digits):
"""
-------------------------------------------------------
Copies the contents of f_in to f_digits and f_no_digits depending
on the contents of f_in:
Lines containing digits are copied to f_digits.
Lines without digits are copied to f_no_digits.
Empty lines are ignored.
Use: file_split(f_in, f_digits, f_no_digits)
-------------------------------------------------------
Parameters:
f_in - source file (file handle - already open for reading)
f_digits - file to contain lines with digits from f_in (file handle
- already open for writing)
f_no_digits - file to contain non-empty lines without digits from f_n
(file handle - already open for writing)
Returns:
None
-------------------------------------------------------
"""

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions