Assuming I have object_list list which contains objects.
I want to check if my current iteration is is at the first or the last.
for object in object_list:
do_something
if first_indexed_element:
do_something_else
if last_indexed_element:
do_another_thing
How can this be achieved? I know that I can use range and count index but if feels clumsy.
Regards