def readFromFile(filename): with open(filename, 'r+b') as file: res = file.read(100) return res How can you make it so that you can, by reading the first 100 characters, skip the next 100 and count the remaining characters? As far as I understand file.read() does not support offset ?
file.seek(file.tell() + 100); rest = file.read()file.seek(file.tell() + 100); rest = file.read()- should I also add a check for output beyond the end of the file? - MaxU