Is it possible for sqlalchemy python flask to break the loop and get the single result value only. for example on my case:
I am looping a list and will have multiple result but my aim is once I get the first row I will break now the loop.
{% for item in cert %}
<div>
<label>ID No:</label>
<label font size="6">{{item.empID}}</label>
<label class="pull-right">Total Certificates:</label>
</div>
<div>
<label>Name:</label>
<label>{{item.name}}</label>
</div>
<div>
<label>Department:</label>
<label>{{item.dept}}</label>
</div>
<div>
<label>Process:</label>
<label>{{item.proc}}</label>
</div>
{% endfor %}
I just want to have something like in python:
list = [1,2,3]
for item in list:
return i
break
Any suggestion or comments will appreciate. Thanks in advance!