我必须在 Python 和 HTML 中使用“或”。
<div>
{% if imp[3][0] == 'abc' || imp[3][0] == 'def' %}
<p>yes</p>
{% endif %}
</div>
我收到一个错误:
jinja2.exceptions.TemplateSyntaxError: expected token 'name', got '|'
但是, && 可以工作。反正?
宝慕林4294392
BIG阳
随时随地看视频慕课网APP
相关分类