make a list from string json? python
<p>I have a json string  i get it from json array below i have given it </p>

<pre><code>annotation = sentence["annotation"]
text = sentence["text"]
#ioblist = [annotation]
ioblist=[[x[0], x[4]] for x in annotation]  #nothing
</code></pre>

<p>the proram did not convert here is my string in list at index 0 </p>

<pre><code>   {u'1': [u'Bill', u'bill', u'NNP', u'B-PERSON'], 
   u'3': [u'born', u'bear', u'VBN', u'O'], 
   u'2': [u'was', u'be', u'VBD', u'O'], 
   u'5':  [u'.', u'.', u'.', u'O'], 
   u'4': [u'1986', u'BIL', u'CD', u'B-DATE']}
</code></pre>

<p><strong>update 1:</strong></p>

<p>I am making list as </p>

<pre><code> ioblist=[[x[0], x[4]] for x in annotation]
</code></pre>

<p><code>range()</code> gives you a iterable of integers, but your dictionary keys are <code>u'...'</code>, i.e. unicode strings. Hence, the lookup <code>ioblist[0]</code> must fail, since <code>0 != u'0'</code> (Python isn't PHP, thankfully).</p>

python