<p>我试图找到一条推文的发送位置,有些人显然在他们的微博上没有位置设置,所以我想知道如何绕过“TypeError:'NoneType'object is not iterable”并在其位置显示“not identified”答案?在</p>
<p>我使用isL`import json的代码</p>
<pre><code>with open('tweets7.txt')as json_data:
data = json.load(json_data)
for r in data['results']:
for b in r['place']:
print (r['place']['full_name'])
break
print r['text']
</code></pre>
<p>`</p>