python looping over n consecutive items in a list
<p>I need to iterate over n consecutive elements in a list.
For example:</p>

<pre><code>data = [1,2,3,4,5,6,7]
</code></pre>

<p>I need to go over:</p>

<pre><code>1 2
2 3
3 4
4 5
</code></pre>

<p>or:</p>

<pre><code>1 2 3
2 3 4
3 4 5
4 5 6
</code></pre>

<p>Is there zip function to do that?</p>
