for i, fragment in enumerate(fragments):
item = etree.SubElement(themes_li, 'a', href="#%s" % fragment)
item.text = str(i + 1)
for i, fragment in enumerate(fragments):
item = etree.SubElement(themes_li, 'a', href="#%s" % fragment)
item.text = str(i + 1)