Which method reads the entire content of a file as a string in Python?
Correct answer
D. read()
6 views
D. read()
6 views
file.read() returns the whole content.
Asked in: Python Interview File Handling
https://docs.python.org/3/tutorial/inputoutput.htmlNot sure why the answer is D? Ask here and get an explanation.