I have a LARGE text file that I am needing to pull several values from. the text file has alot of info I don’t need. Is there a way I can serach for a specific term that is in a line and return the first value in that line. Please example below
text
text text
text
text text text
text text
aaaaa text sum
text
text
text
I need to search for sum and return the value of aaaaa
Is there a way that I can do this?
Are you looking for something like this?
Line.split()will split the line up into words, and then you can select with an index which starts from 0, i.e. to select the 2nd word useLine.split()[1]