Is it possible to read a range of lines of lines from a text file, for example, from line 20 to 52?
I open the file and read the file as follows:
text_file = open(file_to_save, "r")
line = text_file.readline()
but just want to save the data in a given range or, if possible, read from a line after a line containing --- data --- to another line containing - end of data -
I looked through the documentation and online examples and can only find examples that indicate a new line or something.
source
share