import json html_string = '''

Libraries on GitHub

''' with open("all-libs.json", 'r', encoding="utf-8") as json_file: data = json.load(json_file) for org in data["organisations"]: html_string += "\n" html_string += '''
Country City Organisation Repositories
" + org['country'] + "" + org['city'] + "" + org['name'] + "" + str(len(org['repositories'])) + "
''' with open('libraries.html', 'w', encoding='utf8') as html_file: html_file.write(html_string)