Python read through file until match, read until next pattern

后端 未结 2 553
暗喜
暗喜 2021-01-20 12:32

Python 2.4.3

I need to read through some files (can be as large as 10GB). What I need it to do is go through the file until it matches a pattern. Then print that l

2条回答
  •  野性不改
    2021-01-20 13:16

    You're still matching against line, which doesn't change because you're still in the same iteration of the for loop.

提交回复
热议问题