1
00:00:01,130 --> 00:00:05,090
Now something you should know is the cursor concept.

2
00:00:05,090 --> 00:00:12,380
What happens here is that when you create a file, a file object is created and then when you apply the read

3
00:00:12,380 --> 00:00:21,080
method, before applying the written methods the cursor stands at the very first character of the text

4
00:00:21,080 --> 00:00:21,850
file.

5
00:00:21,920 --> 00:00:29,480
When you apply the read methods the cursor goes to the end of the text file.

6
00:00:29,510 --> 00:00:36,200
So now after the read method has been applied the cursor stands here.

7
00:00:36,200 --> 00:00:47,240
If you apply another read operation like that, save, execute, what's going to happen is that maybe you

8
00:00:47,240 --> 00:00:53,420
were expecting these lines to be printed out two times what happens instead is they are printed one

9
00:00:53,420 --> 00:01:01,190
time and then this is just an empty string 
because the cursor after the first execution of read

10
00:01:01,400 --> 00:01:05,300
was at this points and below this point there's nothing.

11
00:01:05,300 --> 00:01:08,030
So you get that empty string there.

12
00:01:08,180 --> 00:01:19,460
What you can do is, if you want to print the content many times, what you can do is save the content in

13
00:01:19,460 --> 00:01:27,230
a variable and then print the content as many times as you wish.

14
00:01:29,810 --> 00:01:38,060
And you'll get the output two times as you can see here.

15
00:01:38,200 --> 00:01:43,310
That's because the read method was executed only once here.

16
00:01:43,840 --> 00:01:45,480
So that's something you should know.

