Looping through partial sections of an array
<p>I have code from a tutorial that does this:</p>

<pre><code>elements = []

for i in range(0, 6):
    print "Adding %d to the list." % i
    # append is a function that lists understand
    elements.append(i)

for i in elements:
    print "Element was: %d" % i
</code></pre>

<p>However, if I only want to print from elements[0] to elements[4], how is this achieved?</p>

<p>Thanks in advance for your feedback!</p>
