I have html file and I want to store the contents of that file in a variable as a string value. I have tried this but it returns a blank string. How can I do this? def myfunc(): str = "" with open("/home/suman/Alert_logo_report.html") as report_file: raw_html = report_file.readlines() str = ''.join(raw_html) return str Continue reading...