I’d read the lines, strip off the trailing newlines, split each line on multiple whitespace, and then remove those lines that contain only repeated ‘=’. That would result in a list where one of the entries was just ['']
, which corresponds to the blank line that separated the 2 tables. I’d then use the first part (excluding the table’s heading) to make a dict, and the second part to make some other convenient structure for a table.
Does the file have to come that way? Can it come as a CSV?
yes it can come
can u pls send the code for parsing
actually it is in plain text format