Can the 'range' function be assigned to a list?
<p>I am studying the <a href="http://learnpythonthehardway.org/index" rel="nofollow">Learn Python The Hard Way</a> PDF. On page 82 i come across this question.</p>

<ul>
<li>Could you have avoided that for-loop entirely on line 23 and just assigned range(0,6) directly to elements?</li>
</ul>

<p>Given the code:</p>

<pre><code># we can also build lists, first start with an empty one
elements = []

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

# now we can print them out too
for i in elements:
    print "Element was: %d" % i
</code></pre>

<p>It seems this is not possible unless i use the map function? Am i correct?  </p>
