displaying list data in template

Hi everyone
i apologize in advance if its a silly question but it really annoying
i have a list filled with some data as below

        like = []
        dislike = []
        for i in range(len(comment_counts)):
            like.append(comment_counts[i].like_count)
            dislike.append(comment_counts[i].dislike_count)
        context['like_count'] = like
        context['dislike_count'] = dislike

and a peace of mu template page

{% for comment in good.comments.all %}
             <p>
                 <span class = "font-weight-bold">
                     {{comment.customer.first_name}} {{comment.customer.last_name}} --
                 </span>
                {{comment.text}}
                <a href="{% url 'edit_comment' pk=good.pk cpk=comment.pk %}">ویرایش</a> |
                <a href="{% url 'delete_comment' pk=good.pk cpk=comment.pk %}">حذف</a>
                <p dir="ltr">
                <label>آیا این نظر مفید بود؟</label>
                <form action="{% url 'comment_votes' pk=good.pk cpk=comment.pk %}" dir="ltr" method="post">
                    {% csrf_token %}
                    <button dir="ltr" class="btn btn-primary btn-sm" type="submit" name="up"
                            value="{{comment.id}}">موافقم
                    </button>
                    <button dir="ltr" class="btn btn-primary btn-sm" type="submit" name="down"
                            value="{{comment.id}}">مخالفم
                    </button>
                </form>
                <p dir="ltr"> <!--  problem is here --!>
                    {{ dislike.dislike_count.forloop.counter0 }}رای مخالف
                    --
                    {{ like.like_count.forloop.counter0 }}رای موافق
                </p>
                <hr>
                </p>
            </p>
            {% endfor %}

what i want to do is to display data of like and dislike lists in this(<!-- problem is here --!>) part
but it did not show me anything
so any idea how to fix this problem
thanks

You are sending like_count and dislike_count to the templates i.e these both are going to be your keys to get the list like and dislike.
Now in your template you can use these two context values like

          {% for like in like_count %}
            {{like}} # if your value is single integer
            {{like.key_a}} # if your value is an object
          {% endfor %}

          {% for dislike in dislike_count %}
            {{dislike}} # if your value is single integer
            {{dislike.key_a}} # if your value is an object
          {% endfor %}

Thanks for your reply
but as you said like and dislike are list and i want to display one item of each list after one iteration of for loop
the piece of code you provide displays all data of each list and that’s not what i want here

The for loop your meant this one {% for comment in good.comments.all %} right ?

yes that’s the right for loop

I’m giving you the logic behind the thing that you want but, I would not suggest you to use this kind of thing as it will make you template rendering much slower when your data grows.

    {% for comment in good.comments.all %}
        {% for like in like_count %}
            {% if forloop.counter == forloop.parentloop.counter %}
                {{like}} # if your value is single integer
                {{like.key_a}} # if your value is an object
            {% endif %}
        {% endfor %}

        {% for dislike in dislike_count %}
            {% if forloop.counter == forloop.parentloop.counter %}
                {{dislike}} # if your value is single integer
                {{dislike.key_a}} # if your value is an object
            {% endif %}
        {% endfor %}
    {% endfor %}

I would suggest you to work around something else in order to get good out of it.

Thank you
do you have any idea about doing this issue in a better way?

For that I need to see the related Models and the code and a clear explanation of what you really trying to achieve.