def write_dict_text(fn, dict):
    """
    Writes all lines in a section dictionary to a file. Each key in the dictionary should have a list of lines associated with it.
    :param fn: filename
    :param dict: dictionary of the form `{ "section 1" : [....], ...}`
    """
    with open(fn, 'w') as f:
        for k, v in dict.items():
            f.write('#' + k + '\n')
            for x in v:
                f.write(x + '\n')
