python操作txt文件,去除文件中的隔行空行

conn = re.sub(result, '\r\n', content)
res = "".join(
  [s for s in conn.strip().splitlines(True) if s.strip()])