Nov-29-2017, 08:39 PM
Do all lines you are interested in starting with 'OA' or 'XB'? I'd read each line and check if starts with one of these. Split the line to get it as a list. Slice it from 1 to 5. Then using list comprehension create e new list as rid of the last two symbols of each number. Finally, join it. The for loop will get four lines of code and you are done.