Question: Python program a) Write a function called line_number that takes as parameters two strings representing file names. Assume these are text files. The function reads
Python program


a) Write a function called line_number that takes as parameters two strings representing file names. Assume these are text files. The function reads the file indicated by the first parameter and writes it:s lines prefixed by the line number to the file represented by the second parameter. The function must have a proper docstring and annotations. Use try/except and in case of an error print a user-friendly message to the terminal and re-raise the exception
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
