index out of range in python dictionary
<p>im trying to implement a dictionary where in key is a number &lt;=10^9 and value is a list of numbers.</p>

<pre><code> a=[] 
 for i in xrange(n):
     h,j = raw_input().split() 
     b=int(h)
     l=int(j)

     a[b].append(l)
</code></pre>

<p>It gives me a list index out of range error.</p>
