{% if age >= 18 %} <p>已成年!</p> {% else %} <p>未成年!</p> {% endif %} 使用Jinja库把语句渲染成判断语句 一定要加上{% endif %}!!!!! Python学习合集(包括Flask)