Question 15
app.py
import sysfrom string import Template as T1from jinja2 import Template as T2
temp = "The book title is $title and it costs {{price}}."if sys.argv[1] == 'jinja 2': temp = T1(temp) out = temp.substitute({'title': 'Python Basics', 'price': '$20'})elif sys.argv[1] == 'string': temp = T2(temp) out = temp.render({'title': 'Python Basics', 'price': '$20'})else: out = 'Invalid input'print(out)Based on the above program, answer the given subquestions.