Why doesn't this cause an array out of bounds error in Python?
<p>I do not know much about python, but I am surprised the following code works:</p>

<pre><code>import sys
prev =  [sys.maxint]*(5)
j = 0
print prev[j]
print prev[j-1]
</code></pre>

<p>In general I thought second <code>print</code> statement should give me an error. Why does this work?</p>

<p>I need to convert some <code>python</code> code into <code>C++</code>, and in <code>C++</code> this will not work.</p>
