好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

why python doesnt have a writeline() method like c

why python doesn't have a writeline() method like c# ?

just curious, it would make writing to a file  a bit easier?

ww <mrwwli <at> gmail.com> writes:

>
> just curious, it would make writing to a file  a bit easier?

Because readline() returns the line with the newline attached, writeline() would
have to require a newline at the. Therefore, it would be equivalent to write()!

Just use f.write("some line\n").

 from

http://www.opensubscriber.com/message/python-list@python.org/11602035.html 


blog client has some thing wrong,i write two times,but it disappear  curious,so finally i put the link over here as a memo

查看更多关于why python doesnt have a writeline() method like c的详细内容...

  阅读:40次

上一篇: 小创意2

下一篇:资源20100129