Why Python language does not have a writeln() method?

前端 未结 5 493
情话喂你
情话喂你 2020-12-30 23:47

If we need to write a new line to a file we have to code:

file_output.write(\'Fooo line \\n\')

Are there any reasons why Python does not ha

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-31 00:27

    Probably no real reason, just that it's really easy to write a newline when you need it, so why clutter up the file interface with an extra method just to do that?

提交回复
热议问题