Write a program to use a letter template file to create a set of letters with the same content, but directed to different people. Design, define and use a function to create letters (let's call it createLettersFromTemplate) and a main function that will call createLettersFromTemplate. What parameters/return value will you define for this function?

Each letter should be placed in a separate file, named with the name of the addressee and extension.txt

File names.txt contains a list of names in Lastname, firstname format, e.g.

Mikelson, Carina
Chien, Towanda
Oser, Jamaal
Grist, Doreen
...

File letter.txt contains the content of the letter, as follows:

Dear Joe:

You are cordially invited to a neighborhood party that will take place on Sunday, October 14 at 79 Henry Street from 3 to 6 pm.

Hope to see you there!

Tom and Jerry,
your friendly neighbors.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.