浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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

posted on 2010-03-01 15:22  lexus  阅读(645)  评论(1编辑  收藏  举报