1 00:00:07,940 --> 00:00:11,205 Here we go with processing files. 2 00:00:11,205 --> 00:00:14,600 Up until now, the only data that our programs have processed, 3 00:00:14,600 --> 00:00:18,150 the only inputs have either come from literals that we put into 4 00:00:18,150 --> 00:00:22,515 the program itself or things that the user typed during execution, 5 00:00:22,515 --> 00:00:25,335 as a result of a call to the input function. 6 00:00:25,335 --> 00:00:29,655 The only place where outputs have gone is the output window, 7 00:00:29,655 --> 00:00:33,855 which doesn't persist after you go to another page in the textbook. 8 00:00:33,855 --> 00:00:38,820 A file contains data that persists between execution of your program. 9 00:00:38,820 --> 00:00:40,575 As a computer user, 10 00:00:40,575 --> 00:00:43,040 you're already familiar with the concept of files, 11 00:00:43,040 --> 00:00:48,005 you've probably worked with image files and spreadsheet files and word processing files. 12 00:00:48,005 --> 00:00:52,310 In this lesson, you'll learn how to manipulate files in a Python program. 13 00:00:52,310 --> 00:00:55,130 We'll only be working with text files, 14 00:00:55,130 --> 00:00:57,829 not audio or other binary formats. 15 00:00:57,829 --> 00:00:59,320 At the end of this lesson, 16 00:00:59,320 --> 00:01:03,110 you should be able to write a program that reads a file's contents, 17 00:01:03,110 --> 00:01:07,130 either as a single string or line by line, 18 00:01:07,130 --> 00:01:11,960 you should be able to use relative paths to specify the location of a file, 19 00:01:11,960 --> 00:01:15,455 you should be able to write new text to a file. 20 00:01:15,455 --> 00:01:20,030 I'll see you at the end for a wrap-up and more geeky humor.