Question · Python course · Module 5: Flask and Web Apps

For loop in Jinja2

How do you start a for loop in a Jinja2 template?

Answer options

  • {{ for animal in animals }}
  • {% for animal in animals %}
  • {# for animal in animals #}
  • <% for animal in animals %>

You can check the correct answer by solving this task in the CodeWorlds game.