def get_template(html): template = ''' Data Workers
{}
'''.format(html) return template def write_html(html, filename): html_template = get_template(html) out = open(filename, 'w+') out.write(html_template) out.close() print('*html file written*') # html = '' # write_html(html, 'data-workers.html')