Iterating on a file doesn't work the second time

后端 未结 4 1603
礼貌的吻别
礼貌的吻别 2020-11-22 08:47

I have a problem with iterating on a file. Here\'s what I type on the interpreter and the result:

>>> f = open(\'baby1990.html\', \'rU\')
>>&g         


        
4条回答
  •  忘掉有多难
    2020-11-22 09:25

    Of course. That is normal and sane behaviour. Instead of closing and re-opening, you could rewind the file.

提交回复
热议问题