{% for parameter_name in document_dictionary.keys() %} {% for comment in document_dictionary[parameter_name][:-1]%} {{ comment }} {% endfor %} {{ parameter_name[1] }}={{ document_dictionary[parameter_name][-1] }} {% endfor %}