title: Combine list values in 1 string
body: <p>I have list like this :</p>
  
  <pre><code>subsets = ["T10", "T12", "T13", "A15", "T23"]
  </code></pre>
  
  <p>I need to loop through this list checking for T followed by A and if this is found to merge T &amp; A i.e.</p>
  
  <p>This is the new list I need:</p>
  
  <pre><code>newset = ["T10", "T12", "T13, A15", "T23"]
  </code></pre>
  
  <p>I'm trying to figure out how to loop through the list and check for the left most value.  I just need an expression for {left char of string of next list item} - I think!</p>
  
  <pre><code>for i in range(len(subsets)):
    if {left char of string for next list item} = "A":
      newset.append(subset[i]+", "+ subset[i+1])
      i+=1
    else:
      newset.append(subset[i]) 
  </code></pre>