Untitled
Anonymous
plain_text
08/21/2023 10:46 AM
508 B
15
Indexable
try:
line_count=0
with open(vm_log_filename, 'r') as input_file, open(filename, 'w') as output_file:
# Using itertools.islice to copy lines between start and end indexes
output_file.writelines(itertools.islice(input_file, X - 1, Y))
line_count+=1
print("Number of lines written to the output file:", line_count)
Editor is loading...