Student answer:
{% if question.type == "mcc"%}
{% for testcases in question.get_test_cases %}
{%if testcases.id|stringformat:"i" in answers.0.answer|safe %}
{{ testcases.options.strip|safe }}
{% endif %}
{% endfor %}
{% elif question.type == "mcq"%}
{% for testcases in question.get_test_cases %}
{%if testcases.id|stringformat:"i" == answers.0.answer|safe %}
{{ testcases.options.strip|safe }}
{% endif %}
{% endfor %}
{%else%}
{{ answers.0.answer|safe }}
{% endif %}