Попробуйте использовать регулярное выражение:
fn = "t.txt"
fn2= "r.txt"
print '-'*70
with open(fn,"w") as f:
f.write("ta\r\ntata\r\n\r\ntata\r\n\r\n\r\nta\r\ntaa\r\n\r\n\r\n\r\ntata")
with open(fn,"r") as f:
print(f.read())
import re
with open(fn,"r") as f:
t = f.read()
subbed = re.sub(r"\r\n\r\n", r"\r\n", t)
with open(fn2,"w") as f:
f.write(subbed)
print '-'*70
with open(fn2,"r") as f:
print(f.read())
Вывод:
----------------------------------------------------------------------
ta
tata
tata
ta
taa
tata
----------------------------------------------------------------------
ta
tata
tata
ta
taa
tata
Sidenote:
Если в Linux используется subbed = re.sub(r"\n\n", r"\n", t)