Consider a text file of lines with names, given in the format
lastname, firstname middlenames
where there is at most one name per line. There is not always a middle name.

The user is prompted for the name of the input file and a name of the output file.

After running the script, the output file contains names in the format

firstname middlenames lastname
and the output file has as many lines as the input file.
  1. Give the Python code to convert one line in the file, given in a string.
  2. Write code for the entire Python script below.

Answer: quiz8a.py