[python] html for loop counter

정리맨·2022년 9월 13일
0
post-custom-banner

{% for keyword in keywords %}

{{ forloop.counter }} # 1 based
{{ forloop.counter0 }} # 0 based

{% endfor %}

출처 : https://stackoverflow.com/questions/25323324/loop-counter-in-for-loop-python-when-writing-in-html-template-file

profile
ㅎㅎ

0개의 댓글