This simple script let you save the data in a dictionary as a table into an html file. I made this as an answer to a request to this video.
The code to transform data into html table
import os a = { "First" : ["1","2"], "Second" : ["1","2","3"] } data = "" for k in a: data += "<td>" + k + "</td>" for d in a[k]: data += "<td>" + d + "</td>" data += "<tr>" data = "<table border=1>" + data + "<table>" print(data) with open("file.html", "w") as file: file.write(data) os.startfile("file.html")
Subscribe to the newsletter for updates
Tkinter templates
My youtube channel
Twitter: @pythonprogrammi - python_pygame