write() vs. writelines()

Gregory Petrosyan gregory.petrosyan at gmail.com
Fri May 26 14:44:15 EDT 2006


Thanks for your reply. I understand this fact, but I wonder why
writelines() works slowly -- I think C code can be optimised to work
faster than Python one. Is it correct that writelines(...) is just a
shorthand for

for ch in ...:
    file.write(ch) 
?




More information about the Python-list mailing list