title: python: create list of tuples from lists
body: <p>I have two lists:</p>
  
  <pre><code>x = ['1', '2', '3']
  y = ['a', 'b', 'c']
  </code></pre>
  
  <p>and I need to create a list of tuples from these lists, as follows:</p>
  
  <pre><code>z = [('1','a'), ('2','b'), ('3','c')]
  </code></pre>
  
  <p>I tried doing it like this:</p>
  
  <pre><code>z = [ (a,b) for a in x for b in y ]
  </code></pre>
  
  <p>but resulted in:</p>
  
  <pre><code>[('1', '1'), ('1', '2'), ('1', '3'), ('2', '1'), ('2', '2'), ('2', '3'), ('3', '1'), ('3', '2'), ('3', '3')]
  </code></pre>
  
  <p>i.e. a list of tuples of every element in x with every element in y... what is the right approach to do what I wanted to do? thank you...</p>
  
  <p><strong>EDIT:</strong> The other two duplicates mentioned before the edit is my fault, indented it in another for-loop by mistake...</p>