title: How to create a list of key:value pairs in a for loop?
body: <p>I have a for loop which outputs a list of 15 values: </p>
  
  <pre><code>for line in data: 
      line # type(line) is `&lt;class 'list'&gt;`
          # do things with line
  </code></pre>
  
  <p>This <code>line</code> is always a Python list of 11 values, i.e. </p>
  
  <pre><code>['value1', 'value2', 'value3', 'value4', ... ] 
  </code></pre>
  
  <p>I have a list of dictionary keys, which I have manually created: </p>
  
  <pre><code>['key1', 'key2', 'key3', ...]
  </code></pre>
  
  <p>I would like to join my keys to each of the values for each line in my for loop. Therefore, I can define a new line that looks like </p>
  
  <pre><code> ['key1': 'value1', 'key2': 'value2', 'key3': 'value3', ... ]
  </code></pre>
  
  <p>This would be used in the for loop, i.e. </p>
  
  <pre><code>for line in data: 
      line # values
      # join key-value pairs
      # new_line = ['key1': 'value1', 'key2': 'value2', 'key3': 'value3', ... ]
          # do things with new_line
  </code></pre>
  
  <p>EDIT: I don't believe this is a repeat question. <code>zip(keys, values)</code> does not produce the desired result. </p>
  
  <p>EDIT2: Would it be easier to create one large dictionary within a list?</p>
  
  <pre><code>[{'key1': 'value1', 'key2': 'value2', 'key3': 'value3', ... }]
  </code></pre>
  
  <p>or perhaps a tab-delimited test file? </p>
  
  <p>key1:value1  key2:value2  key3:value3   ....</p>