title: Extracting items from list into grouped and nested lists
body: <p>I have a list like this:</p>
  
  <pre><code>FULL_DATA = ['LIN+++1234:BP', 'PIA+1+PRODUCT 1',  'QTY+113:10:PCE', 'SCC+4', 'DTM+2:20200506:102', 'QTY+113:14:PCE', 'SCC+4', 'DTM+2:20190513:102', 'LIN+++5=5678:BP', 'PIA+1+PRODUCT 2', 'QTY+113:19:PCE', 'SCC+4', 'DTM+2:20190520:102', 'QTY+113:13:PCE', 'SCC+4', 'DTM+2:20190527:102']
  </code></pre>
  
  <p>This extract is just the short version of the actual list which contains dozens of repeating LIN entries. </p>
  
  <p>My current approach was to extract the index of the 'PIA' and 'QTY' tags and building pairs with the next occurrence. Subsequently looping through those start and end limits and building a new nested sublist.</p>
  
  <p>Since the 'PIA' tag can occur multiple times in a file, the best approach is to use the 'LIN' tag.</p>
  
  <p>This seems clunky and I am looking for a more elegant solution to retrieve an output as such:</p>
  
  <pre><code>PRODUCT_1 = [['QTY+113:10:PCE', 'SCC+4', 'DTM+2:20200506:102'], ['QTY+113:14:PCE', 'SCC+4', 'DTM+2:20190513:102']]
  PRODUCT_2 = [['QTY+113:19:PCE', 'SCC+4', 'DTM+2:20190520:102'], ['QTY+113:13:PCE', 'SCC+4', 'DTM+2:20190527:102']]
  </code></pre>
  
  <p>Thanks for your help in advance.</p>