title: Improving a List Comprehension
body: <p>The list comprehension below achieves the desired result/output:</p>
  <ol>
  <li>Each tuple in the list is indexed sequentially</li>
  <li>The names are grouped together by suit</li>
  <li>The names are in a consistent order</li>
  </ol>
  <p>Code (deck of cards toy example):</p>
  <pre><code>Suits = [&quot;Hearts&quot;]*3 +[&quot;Diamonds&quot;]*3
  Names = [&quot;Two&quot;,&quot;Ten&quot;,&quot;King&quot;]
  
  z = [(i,Names[(i-1)%3],Suits[((i-1)%6)]) for i in range(1,7)]
  </code></pre>
  <p>Output z:</p>
  <pre><code>[(1, 'Two', 'Hearts'),
   (2, 'Ten', 'Hearts'),
   (3, 'King', 'Hearts'),
   (4, 'Two', 'Diamonds'),
   (5, 'Ten', 'Diamonds'),
   (6, 'King', 'Diamonds')]
  </code></pre>
  <p>It works because the original <code>Suits</code> list was changed from <code>[&quot;Hearts&quot;,&quot;Diamonds&quot;] to[&quot;Hearts&quot;]*3 +[&quot;Diamonds&quot;]*3.</code></p>
  <p>This feels contrived; although it works, I'm looking for a better solution.</p>