I am an amateur using Python for some time. Sorry if this is a stupid question, but I was wondering if anyone knows an easy way to grab a bunch of lines if the input file format looks like this:
"Heading 1
Line 1
Line 2
Line 3
Heading 2
Line 1
Line 2
Line 3 "
I wonβt know how many lines after each heading, but I want to grab them all. All I know is the name or regular expression pattern for the header.
The only way I know to read the file is the path "for the line in the file:", but I donβt know how to capture the lines AFTER which line Iβm leading to now. Hope this makes sense and thanks for the help!
* ! , , , , . ... ? *