Python - delete blank lines of text at the end of the file,file_out[-1] = file_out[-1].strip('\n')