Question 20
Consider the files given below.
File 1: macros.py
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')def home(): list = [43, 76, 87, 98, 45, 23] return render_template('index_macros.html', my_list = list)
if __name__=='__main__': app.run(debug=True)File 2: index_macros.html
{% from "_macros.html" import calc %}<!DOCTYPE html><html> <head> <title> Macros </title> </head> <body> {{ calc(my_list) }}
</body></html>File 3: _macros.html
{% macro calc(my_list) %} <h3> The original list :{{ my_list }} </h3> <h3> The modified list: </h3> {% for num in my_list if num%2==1 and num%3==1 %} {{ num }} {% endfor %}{% endmacro %}Which of the following will be the correct output, if the above application is running on URL “ http://127.0.0.1:5000/”?