Get lengths of a list in a jinja2 template Get lengths of a list in a jinja2 template python python