Respuesta :
Answer:
Answered below
Explanation:
aFile = open("books.txt", "r")
This code uses the function open() which takes two parameters. The first parameter is the file name while the second parameter is the mode in which you are accessing the file.
The "r" mode opens the file in a reading state. That is, you can only read from the file. This code completes the reading process
aFile.read( )
The "w" mode opens the file so you can write to it and make changes.
The "a" mode opens the file so you can add contents to it.
The statement which opens a text file somthat you can retrieve the information it contains is; aFile = open("books.txt", "r")
Discussion:
The code above uses the function open() which requires two parameters.
First of which is the file name while the second parameter is the mode in which one is accessing the file.
On this note, the "r" mode opens the file in a reading state. This in essence means, you can only read from the file. This code completes the reading process
- aFile.read( )
Post Script:
- The "w" mode opens the file so one can write to it and make changes.
- The "a" mode opens the file so one can add contents to it.
Read more on text file:
https://brainly.com/question/6962696