Marilyn Davis wrote: > significant_headers[each] = text[len(each):].strip().replace('"','\\"').replace('\n',' ') This looks like you are trying to make an escaped string, with literal backslashes. You might prefer using the 'string_escape' codec: >>> '\n'.encode('string_escape') '\\n' Kent