I am fairly new to Python, and I have been given an assignment in my research group to extract the important data from an output file. The output file is very large, containing data split into sections. Each section is headed with a title in all capital letters, such as "SURFACE TEMPERATURE," and the following 100-600 lines all contain relevant data. Essentially, I need to read in the file and search for the line that has the string that indicates the data. The number of rows for each data set is fixed, but the location in the text file is not. I then need to save the desired data to a different list. Any help or direction would be appreciated.
I have a decent idea about how to open and read the file in python, but I am at a loss when trying to figure out how to search for the section of data and save it to a new list/array.