Lab 6
Objectives: more practice with lists and files, command-line arguments
Replace in a file
Write a function replace(input_file, output_file, s, r) that replaces all occurrences of the string s in the input file with the string r, and writes the resulting file into the file called output_file.
Make your program runnable as a script from the command line as python replace_in_file.py input_file output_file s r. To do so make use of the array sys.argv (note that you will need to import the sys module before using sys.argv). This list contains the command-line arguments that were used in order to execute the script. The first element in the list is the file name in which the program resides, and the rest of the elements are the command-line arguments that were given by the user.
List merging
Write a function merge(list1, list2) that receives two sorted lists as input and merges them. It should return the merged list.
