I have a very large text file of 16gb . I need to skip no of line .I want to skip those line in time efficient manner. I am using python for code.how to do that ?
Time efficient way to skip no of line from very large text file (16gb) using python
224 Views Asked by Abhi At
2
Just read the number of lines you want to skip and throw them away:
You can also use
enumerate
to have a generator that only yields lines once you have skipped the lines you want to:The second there is likely faster.