kaj0103
kaj0103

Reputation: 1

file.read() output differences

I know there are a lot of questions about file.read() but I dont think any of them answer this.... Can someone tell me why, if I read a file with say 12 lines, in the interpreter and print it by just typing in filename.read(), it is presented on one continuous line with the EOL character to signify each line?

Then, if I do the same but create define an object, say file-output = filename.read(), and then print that object, it then prints out as it appears in the file?

Does what I said make sense????

Many thanks

Upvotes: 0

Views: 560

Answers (0)

Related Questions