[Solved] How to skip the first two lines of a file and read those lines that are multiple of 5 [closed]


You can read the file and then filter it.

with open("file.txt") as f:
    f.readlines()

lines = [x.strip() for x in f][2::5]

2

solved How to skip the first two lines of a file and read those lines that are multiple of 5 [closed]