I can't seem to get a clear cut answer on how to do this. I have a pretty table that I print to the terminal but what if I want to create an html file and print the table to that html file? How can this be done.
This is my table that I have, how could I go about writing this to a new html file?
tbl = PrettyTable(["Occurs", "Occurrences"])
for word, cnt in matches.items():
tbl.add_row([word, cnt])
tbl.align = 'l'
print(tbl.get_string(sortby="Occurrences", reversesort=True))