Python: Looping through all but the last item of a list
<p>I would like to loop through a list checking each item against the one following it.</p>

<p>Is there a way I can loop through all but the last item using for x in y? I would prefer to do it without using indexes if I can.</p>

<p><strong>Note</strong></p>

<p>freespace answered my actual question, which is why I accepted the answer, but SilentGhost answered the question I should have asked.</p>

<p>Apologies for the confusion.</p>
