First page Back Continue Last page Overview Graphics

Reading and Writing to a File

We opened the file for reading with

fileHandle = open('yellow_snow.txt')

alternatively, we could have done it with:

fileHandle = open('yellow_snow.txt','r')

Opening a file for writing is analogue:

fileHandle = open('yellow_snow_copy.txt','w')