{% for i in set_list %}
{% if i[0] in minifigs %}
{% endif %}

{% set ns = namespace(found=false) %} {% for file in files %} {% if ns.found is sameas false and file.startswith(i[0]) %} {% set ns.found = true %} {% endif %} {% endfor %}
{% endfor %}