Chapter 12 - File I/O Flashcards
1
Q
What are two types of text file formats?
A
text file formats and binary file formats.
2
Q
What method is used to open a file?
A
f = open(‘temp.txt’, ‘r’)
3
Q
How do we read lines from a file?
A
f= open(‘temp.txt’. ‘r’)
4
Q
What is the data type of a line read from a file?
A
5
Q
What always appears at the end of a line read from a file?
A
f.close()