Skip to content
Myr

cycle.py

This file

Path

examples/basic/cycle.py

16 lines · 301 bytes · Python

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 0166b4c point at it.

fix formattingDavid Lordbefore adoption0166b4c

lines 1–16why, one step back
1from jinja2 import Environment
23env = Environment(4 line_statement_prefix="#", variable_start_string="${", variable_end_string="}"5)6print(7 env.from_string(8 """\9<ul>10# for item in range(10)11 <li class="${loop.cycle('odd', 'even')}">${item}</li>12# endfor13</ul>\14"""15 ).render()16)