import re


def read_file(filename):
    """ Read a string from a file """
    fh = open(filename, "r")
    file_str = fh.read()
    file_str = re.sub("$\n", "", file_str)
    fh.close()
    return file_str