1 00:00:08,000 --> 00:00:10,650 We're chugging along here. 2 00:00:10,650 --> 00:00:13,855 You've learned the basics of reading and writing files now. 3 00:00:13,855 --> 00:00:15,700 There are two things that trip people up, 4 00:00:15,700 --> 00:00:17,480 so just keep these in mind. 5 00:00:17,480 --> 00:00:20,195 First, you have to pass a string, the file's name, 6 00:00:20,195 --> 00:00:23,440 as the first parameter when you call the open function. 7 00:00:23,440 --> 00:00:26,770 If you have a variable name whose value is the file name, 8 00:00:26,770 --> 00:00:28,210 don't put it in quotes. 9 00:00:28,210 --> 00:00:30,085 If you have a literal file name, 10 00:00:30,085 --> 00:00:31,955 do put it in quotes. 11 00:00:31,955 --> 00:00:36,595 Second, you have to keep track of the distinction between the file name, 12 00:00:36,595 --> 00:00:38,890 a string, the file object, 13 00:00:38,890 --> 00:00:41,155 does the thing return by the open function, 14 00:00:41,155 --> 00:00:46,495 and the file's contents which you get by doing operations on the file object. 15 00:00:46,495 --> 00:00:50,400 I'm glad you made it this far, it's joke time. 16 00:00:50,400 --> 00:00:56,990 Reading, I had plans to read a book about sinkholes, but they fell through. 17 00:00:56,990 --> 00:01:03,245 Writing, there was once a young man who professed his desire to become a great writer. 18 00:01:03,245 --> 00:01:05,585 When asked to define great, he said, 19 00:01:05,585 --> 00:01:09,035 "I want to write stuff that the whole world will read, 20 00:01:09,035 --> 00:01:13,135 stuff that people will react to on a truly emotional level, 21 00:01:13,135 --> 00:01:14,789 stuff that will make them scream, 22 00:01:14,789 --> 00:01:18,370 cry, howl in pain and anger." 23 00:01:18,370 --> 00:01:25,410 He now writes the error messages for the Python Interpreter. See you next time.