import json def generate_faq_html(faq_data): html = "\n\nFAQ\n\n\n

FAQ

\n" for question, answer in faq_data.items(): html += "

" + question + "

\n" html += "

" + 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()