equal
deleted
inserted
replaced
35 Hello, World! |
35 Hello, World! |
36 |
36 |
37 What is the value of content, at the end of this code block:: |
37 What is the value of content, at the end of this code block:: |
38 |
38 |
39 f = open('hello.txt') |
39 f = open('hello.txt') |
40 content = f.read() |
40 pre_content = f.read() |
41 content = f.read() |
41 content = f.read() |
42 f.close() |
42 f.close() |
43 |
43 |
44 Answer: It is a null string. |
44 Answer: It is a null string. |
45 |
45 |
124 Larger Questions |
124 Larger Questions |
125 ---------------- |
125 ---------------- |
126 |
126 |
127 .. A minimum of 2 questions here. |
127 .. A minimum of 2 questions here. |
128 |
128 |
129 1. f.read(size) |
129 1. What does ``f.read(size)`` do? |
130 |
130 |
131 #. Print every alternate line of a file, starting at the first line. |
131 #. Print every alternate line of a file, starting at the first line. |
132 |
132 |
133 #. Print the file in reverse. Starting from the last line to the |
133 #. Print the file in reverse. Starting from the last line to the |
134 first. |
134 first. |