如何在Django temp中迭代元组索引

2024-10-03 13:30:04 发布

您现在位置:Python中文网/ 问答频道 /正文

假设我有这个

mylst = [(a, b, c), (x, y, z), (l, m, n)]

而不是现在

{\% for item in mylst \%}    
     {{ item.0 }} {{ item.1}} {{ item.2 }}    
{\% endfor \%}

我能再喝一杯吗

^{pr2}$

Tags: inforitempr2endformylst