Python: IndexError: list index out of range - itens = [{}] : <p>I know it may seem like a simple question, but I really could not figure it out ...<br />How to solve?<br /><br />&gt;&gt;&gt; itens = [{}]<br />&gt;&gt;&gt; i = 0<br />&gt;&gt;&gt; itens[i]['vendedor'] = 1<br />&gt;&gt;&gt; i = 1<br />&gt;&gt;&gt; itens[i]['vendedor'] = 2<br />Traceback (most recent call last):<br /> File "&lt;stdin&gt;", line 1, in &lt;module&gt;<br />IndexError: list index out of range</p>
