Q. Which of the following function is used to open a file for reading in Python?
β
Correct Answer: (B)
open(file_name, mode)
Explanation: The open() function returns a file object, which has a read() method to read the file contents.