You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
from jinja2 import Environment
|
|
|
|
env = Environment(
|
|
line_statement_prefix="#", variable_start_string="${", variable_end_string="}"
|
|
)
|
|
print(
|
|
env.from_string(
|
|
"""\
|
|
<ul>
|
|
# for item in range(10)
|
|
<li class="${loop.cycle('odd', 'even')}">${item}</li>
|
|
# endfor
|
|
</ul>\
|
|
"""
|
|
).render()
|
|
)
|