title: List transformation in python
body: <p>If I have a list like:</p>
  
  <pre><code>a = ['AB', ['CD', 'DE'], 'FG']
  </code></pre>
  
  <p>How do I transform it to a 2D list as shown:</p>
  
  <pre><code>[['AB', 'CD', 'FG'], ['AB', 'DE', 'FG']]
  </code></pre>
  
  <p>Using itertools.product also expands 'AB' to 'A', 'B'.</p>