Which Python function is used to open a file for reading?
- file_open()
- open()
- open_file()
- read_file()
The 'open()' function in Python is used to open a file for reading. It returns a file object that can be used to read the file's contents.
Loading...
Related Quiz
- Which Pandas function is used to read a CSV file into a DataFrame?
- The ____ function in the functools module is used to transform a method into a class method decorator.
- In Python, how do you define a method inside a class to access and modify the objects’ attributes?
- In Python, ____ is used to define a function that takes an arbitrary number of positional arguments.
- To make a module's functions directly accessible, you can use the _______ statement.