for_statement

for循环在 flask 中,跟if使用方法类似

dy>
    <ul>
        {% for user in users %}
        <li> {{ user }} </li>
        {% endfor %}

    </ul>

    <table>
        <thead>
            <tr>
                <th>名称</th>
                <th>价格</th>
                <th>语言</th>
                <th>作者</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                {% for key in book.keys() %}
                    <td>{{ key }}</td>
                {% endfor %}
            </tr>
        </tbody>
    </table>

###表格针对字典遍历,报错了,但找不出来问题

猜你喜欢

转载自blog.csdn.net/hebi123s/article/details/81912178