import json def generate_faq_html(faq_data): html = "\n
\n" + answer + "
\n" html += "\n" return html def main(): with open("faq.json", "r") as f: faq_data = json.load(f) html = generate_faq_html(faq_data) with open("faq.html", "w") as f: f.write(html) if __name__ == "__main__": main()