Python Flask Basics Character Builder Loop Nested Items

eitan hershko
eitan hershko
1,556 Points

Now add a new <ul> inside of the <li> with a class of "courses". Inside this <ul> loop through the teacher's 'courses' k

i cannot understand what i am doing wrong!
from flask import Flask, render_template

from teachers import TEACHERS

app = Flask(__name__)

def index():
    return render_template("teachers.html", teachers=TEACHERS)
<ul class="teachers">
  {% for teacher in teachers %}
      <h2> {{ teacher['name'] }} </h2>
      <ul class="courses">
        {% for course in teacher %}
          <li>{{ course['course'] }}</li>
        {% endfor %}
  {% endfor %}