[Solved] Reading log files in python
Try this way. but you have to confirm that each row list length must equal to 6. list1 = [] list2 = [] with open(‘example.log’) as f: for i in f.readlines(): if (len(i.split(‘,’)) == 6): list1.append(i.split(‘,’)[4]) list2.append(i.split(‘,’)[5]) print(list1) print(list2) 1 solved Reading log files in python