How to access previous/next element while for looping?
<p>Is there a way to access a list(or tuple, or other iterable)'s next, or previous element while looping through with for loop?</p>

<pre><code>l=[1,2,3]
for item in l:
    if item==2:
        get_previous(l,item)
</code></pre>
