Question: code in python3 pls Write a function called writeLines() that takes a filename (string) and a list of strings as arguments and prints the given
code in python3 pls
Write a function called writeLines() that takes a filename (string) and a list of strings as arguments and prints the given list to the given file. The function should replace the file if it already exists, and should create a new file if it does not already exist.
Write a function called reverseFile() that takes a filename (string) and creates a new file called reverse_filename, in which each line of text in the input file is printed in reverse. That is, the first line in the output file should be the last line of the input file, the second line of output should be the second last line of input. Each individual line should read the same (left-to-right) as it did in the input file.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
