擅长:python、mysql、java
<p>对于这里希望将类型为<code>SList</code>的jupyter标准输出(<code>stdout</code>)转换为<code>JSON</code>的人,我就是这么做的:</p>
<pre><code>import json
output = !command #output is an SList
j_out = json.dumps(output) #jout is a str
out_dict = json.loads(j_out) #out_dict is a list
out_dict[i][j]... #to access list elements
</code></pre>
<p>这假设<code>command</code>已将要处理到python字典中的输出适当格式化</p>