SILENT KILLERPanel

Current Path: > > opt > alt > python37 > share > doc > alt-python37-jinja2 > examples > basic


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/alt/python37/share/doc/alt-python37-jinja2/examples/basic

NameTypeSizeLast ModifiedActions
templates Directory - -
cycle.py File 301 bytes April 05 2021 17:47:37.
debugger.py File 223 bytes April 05 2021 17:47:37.
inheritance.py File 392 bytes April 05 2021 17:47:37.
test.py File 675 bytes May 11 2021 23:25:55.
test_filter_and_linestatements.py File 456 bytes April 05 2021 17:47:37.
test_loop_filter.py File 301 bytes April 05 2021 17:47:37.
translate.py File 544 bytes April 05 2021 17:47:37.

Reading File: //opt/alt/python37/share/doc/alt-python37-jinja2/examples/basic/cycle.py

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()
)

SILENT KILLER Tool