theFile = open('thefile.txt', 'r')
FILE = theFile.readlines()
theFile.close()
printList = []
for line in FILE:
    if 'TestName' in line or 'Totals' in line:
        printList.append(line)
for item in printList:
    pass
log file parsing python