Skip to content

Instantly share code, notes, and snippets.

@rohitdholakia
Created December 2, 2013 01:25
Show Gist options
  • Save rohitdholakia/7743490 to your computer and use it in GitHub Desktop.
Save rohitdholakia/7743490 to your computer and use it in GitHub Desktop.
num questions for tags
from collections import defaultdict
tags_dict = defaultdict(int)
for key in question_details.iterkeys():
for t in question_details[key]['tags']:
tags_dict[t] += 1
print sorted(tags_dict.iteritems(), key = lambda x: x[1], reverse = True)[:20]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment