How do I see/get the Number of subreddits I downloaded using reddits API
<pre><code>&gt;&gt;&gt; import requests
&gt;&gt;&gt; from pprint import pprint 

&gt;&gt;&gt; r = requests.get('http://www.reddit.com/reddits.json', headers= {'User-Agent': 'me'})
&gt;&gt;&gt; data = r.json()
&gt;&gt;&gt; pprint(data.keys())
</code></pre>

<p>This prints subreddits &amp; im trying to figure out how much it prints out or if I can print out a certain number. Thanks !</p>

<pre><code>import requests

r = requests.get('http://www.reddit.com/reddits.json', headers= {'User-Agent': 'me'})
data = r.json()

print(len(data['data']['children']))
</code></pre>

<p>The structure of the JSON is complicated, so I'm not entirely sure what you are trying to count, but <code>['data']['children']</code> appears to be the root of the subreddits.</p>

python json api reddit-api