Which of the following open modes allow you to perform read operations? (Select two answers)
- r
- a
- r+
- w
Explanation: These are the open modes in Python:
- r – opens a file for reading.
- w – opens a file for writing.
- a – opens a file for appending at the end. Creates a new file if it does not exist.
- t – opens in text mode.
- b – opens in binary mode.
- + – opens a file for updating (reading and writing).
More Questions: Python Essentials 2 – Module 4 Test
Please login or Register to submit your answer