Jul-01-2023, 11:45 AM
(This post was last modified: Jul-01-2023, 11:45 AM by deanhystad.)
Look to see if the line from the file starts with (hint hint) "[Event "Let's Play!"]".
The logic would be something like this:
The logic would be something like this:
Output:output file = None
open input file
for line in file
if line starts with "[Event "Let's Play!"]"
if output file
close output file
open new output file
if output file
write line to output file
close input file
close output file
There are also command line tools that will do the job, like awk.