<pre><code>q_values_table = {}
light = ['red', 'green']
v_actions = ['None','forward','left','right']
for i in v_actions:
for j in light:
for k in v_actions:
for l in v_actions:
for m in v_actions:
q_values_table[v_actions[i],light[j],v_actions[k],v_actions[l],v_actions[m]] = None
print q_values_table
</code></pre>
<p>我希望我的输出像<code>{('right','red','forward','right','left') : None}</code>
所有的价值观。你知道吗</p>
<p>但是我得到了这个错误<code>list indices must be integers, not str</code></p>