Skip to content

Instantly share code, notes, and snippets.

@djokester
Created August 7, 2018 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djokester/265c32cb5f3e8414eb1317b25f7e98d3 to your computer and use it in GitHub Desktop.
Save djokester/265c32cb5f3e8414eb1317b25f7e98d3 to your computer and use it in GitHub Desktop.
Aggregating Topics
# Create the list of topics
topic_list = []
for question in questions:
if len(question["topics"]) > 0:
for topic in question["topics"]:
topic_list = topic_list + [topic["name"]]
topic_list = list(set(topic_list))
print(len(topic_list))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment