This is a sample Python script to parse a text file line by line and extract data.
I have created this to extract the details of job applicants applied to our Linkedin job post. Linkedin offer no option to download the details of applicants in bulk but they do share the individual applications as an email. For my purpose, I have dowloaded the emails in mbox format and use this script to extract the data from it. The details are updated in my article How to Extract Data from LinkedIn Job Application Emails
This is a custom script made for my use, you can adapt it for your need and use it at your own risk.