擅长:python、mysql、java
<p>你得给这本字典起个名字,像这样</p>
<pre class="lang-py prettyprint-override"><code>dict1 = {'message': 'success',
'people': [
{'name': 'Sergey Ryzhikov', 'craft': 'ISS'},
{'name': 'Kate Rubins', 'craft': 'ISS'},
{'name': 'Sergey Kud-Sverchkov', 'craft': 'ISS'}
],
'number': 3}
# And then this will access it, by looping over the list and printing out all of the 3 names
for i in dict['people']:
print(i['name'])
</code></pre>