Q. What is the significance of newline = ’’ argument in file open() function?


Answer :-

When newline = " ensures that no end of line (EOL) translation would take place while storing the file contents on the disk. By default text files are stored with some text translations, EOL translation is one of these. By specifying newline = " as argument to file open() function, we ensure that no EOL translation takes place. This is useful when we use the files on different platforms.

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post