Write a script to convert the list in the first attached text file into the list seen below. This was more of a challenge to get the logic pattern than I thought at the onset. The beginning list corresponds to Project Number - Retail Store Number - Checkout lane number - MessageWrapR lane template code. The conversion is for a summary of the Project - Store Number - store lanes that have a MessageWrapR installed. The second text file is my long- winded solution.

Code:
PRJ.00414  3048   1,2,3,4
PRJ.00522    57   9,10,11,12
PRJ.00546     8   3,4,6,8
             69   2,3,4,5
PRJ.00559    11   4,5,6,7
             15   2,4,5,6
             16   2,3,4,5
             20   2,3,4,5
             64   4,5,6,7
             68   3,4,5,6
PRJ.00577  8350   2,3,4,5,6,7,8
           8225   4,5,6,7,8,9,10,11
PRJ.00578    21   2,3,6,7
             75   2,3,4,5
             83   2,3,4,5
            137   2,3,4,5
            138   3,4,5,6
            139   3,4,5,6
            127   4,5,6,7
PRJ.00581     1   2,3,4,5,6,7,8,9
Attached Files