Generation

generate functionWed, 03 May 2023

read all of the .html files which in a folder

def read_html(folder): for filename in os.listdir(folder): if filename.endswith(".html"): infile = folder + filename with open(infile, "r") as f: text = f.read() print(text)

Questions about programming?Chat with your personal AI assistant