title: How do I convert a tuple of tuples to a one-dimensional list using list comprehension?
body: <p>I have a tuple of tuples - for example:</p>
  
  <pre><code>tupleOfTuples = ((1, 2), (3, 4), (5,))
  </code></pre>
  
  <p>I want to convert this into a flat, one-dimensional list of all the elements in order:</p>
  
  <pre><code>[1, 2, 3, 4, 5]
  </code></pre>
  
  <p>I've been trying to accomplish this with list comprehension. But I can't seem to figure it out. I was able to accomplish it with a for-each loop:</p>
  
  <pre><code>myList = []
  for tuple in tupleOfTuples:
     myList = myList + list(tuple)
  </code></pre>
  
  <p>But I feel like there must be a way to do this with a list comprehension.</p>
  
  <p>A simple <code>[list(tuple) for tuple in tupleOfTuples]</code> just gives you a list of lists, instead of individual elements. I thought I could perhaps build on this by using the unpacking operator to then unpack the list, like so:</p>
  
  <pre><code>[*list(tuple) for tuple in tupleOfTuples]
  </code></pre>
  
  <p>or</p>
  
  <pre><code>[*(list(tuple)) for tuple in tupleOfTuples]
  </code></pre>
  
  <p>... but that didn't work. Any ideas? Or should I just stick to the loop?</p>