Python > File object methods > Flashcards
read
Reads the contents of the file
readline
Reads just one line of a text file
write(‘stuff’)
Writes “stuff” to the file
truncate
Empties the file. Watch out!
seek(0)
Moves the read/write location to the beginning of the file
close
Closes the file