Python check first and last index of a list -


Assume that the object is the list that contains the objects.

I want to see that my current move is on the first or last item for the object list

 : if_something if first_indexed_element: do_something_else If last_commented_allement: do_another_thing  

How can this be achieved? I know that I can use the category and counting index, but if it seems unnecessary.

prior>

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -