def read_file_to_string(filename):
    """
    Given a filename, opens the file and returns the contents as a string.
    """
    f = open(filename, 'r')
    file_str = ""
    
    for line in f:
        file_str = "{0}{1}".format(file_str, line)
    
    f.close()
    return file_str