Question 28
Consider the following Python flask code running on the url http://127.0.0.1:5000.
from flask import Flask
app = Flask(__name__)movies = { "Spider man1": ["action", 5, "Sam Raimi"], "Batman": ["action", 3, "Matt Reeves"], "Joker": ["thriller", 4, "Todd Philips"], "Ted": ["comedy", 3, "Seth MacFarlane"],}def doSomething(g): l = [] for key in movies: if movies[key][0] == g: l.append(key) return l
@app.route("/<genre>")def home(genre): return doSomething(genre)
if __name__ == "__main__": app.run(debug=True)Based on the above data, answer the given subquestions.