Question: in Python. Write a program that reads in two files: a template and a database and writes junk mails (save your outputs as the .txt

in Python. in Python. Write a program that reads in two files: a templateand a database and writes junk mails (save your outputs as the

Write a program that reads in two files: a template and a database and writes junk mails (save your outputs as the .txt format) using the template email format. The template file contains text and tags. The tags have the form 11| 12l 13|... and need to be replaced with the first, second, third, field in the current database record. A typical database looks like this: Mr.lHarryMorgan 1105 Torre Ave.CupertinolCAl95014 Dr.lJohn[Leel702 Ninth Street Apt. 4|San Jose|CA195109 Miss|Evelyn|Garcia 1101 S. University PlacelAnn ArborMI148105 And here is a typical form letter: 0: 1 21 13 14 151, 16( 1? Dear 11 3 You and the |3| family may be the lucky winners of S10,00,000 in the Python clearinghouse sweepstakes. Please visit our offices in |5], 6 to confirm your winning status. Sincerely, Scammers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!