file name 'treasure txtstring 'treasure islandstring book file "openingthe file data to write writing to the file file object "closingthe file finished with the file enough of reading files robert louis stephenson has prepared for us let' write our own this is again three phase process we will open file for writingwrite to it and then close it