Write A Python Program To Fill A Letter Template?

 Write A Python Program To Fill A Letter Template Given Below With Name And Date.

Letter : 

Dear <|NAME|>,
Greetings from ABC coding house. I am happy to tell you about your selection
Congratulation You are selected!
Date: <|DATE|>







                      

Code:

letter = '''Dear <|NAME|>,
Greetings from ABC coding house. I am happy to tell you about your selection
Congratulation You are selected!
Date: <|DATE|>
'''
name = input("Enter Your Name\n")
date = input("Enter Date\n")
letter = letter.replace("<|NAME|>", name)
letter = letter.replace("<|DATE|>", date)
print(letter)

Output:



Download Source Code

Comments

Popular posts from this blog

Write A Python Program, Create n Empty Dictionary Allow 4 Friends To, Enter Their Favorite Programming Language As values and User Keys as their Name Assume That The Names Are Unique.

Write Python Program To Store Seven Fruits Name In a List Enter By The User