title: Python loops with multiple lists?
body: <p><strong>&lt;edit></strong>
  Thanks to everyone who has answered so far. The zip and os.path.join are really helpful. Any suggestions on ways to list the counter in front, without doing something like this:</p>
  
  <pre><code>zip(range(len(files)), files, directories)
  </code></pre>
  
  <p><strong>&lt;/edit></strong></p>
  
  <p>Hi,</p>
  
  <p>I'm in the process of learning Python, but I come from a background where the following pseudocode is typical:</p>
  
  <pre><code>directories = ['directory_0', 'directory_1', 'directory_2']
  files = ['file_a', 'file_b', 'file_c']
  
  for(i = 0; i &lt; directories.length; i++) {
      print (i + 1) + '. ' + directories[i] + '/' + files[i] + '\n'
  }
  
  # Output:
  # 1. directory_0/file_a
  # 2. directory_1/file_b
  # 3. directory_2/file_c
  </code></pre>
  
  <p>In Python, the way I would write the above right now, would be like this:</p>
  
  <pre><code>directories = ['directory_0', 'directory_1', 'directory_2']
  files = ['file_a', 'file_b', 'file_c']
  
  for i in range(len(directories)):
      print '%s. %s/%s' % ((i + 1), directories[i], files[i]
  
  # Output:
  # 1. directory_0/file_a
  # 2. directory_1/file_b
  # 3. directory_2/file_c
  </code></pre>
  
  <p>While reading Dive into Python, Mark Pilgrim says that using for loops for counters is "Visual Basic-style thinking" (<a href="http://diveintopython.net/file_handling/for_loops.html#fileinfo.for.counter" rel="noreferrer">Simple Counters</a>). He goes on to show how to use loops with dictionaries, but never really addresses a python solution in regards to how for loop counters are typically used in other languages.</p>
  
  <p>I was hoping somebody could show me how to properly write the above scenario in Python. Is it possible to do it a different way? </p>
  
  <p>If I took out the incrementing line count, is it possible to just match the two lists together using some kind of list comprehension?</p>
  
  <p>For example, if all I wanted from the output was this (no counters, is that possible with list comprehension):</p>
  
  <pre><code># Output:
  # directory_0/file_a
  # directory_1/file_b
  # directory_2/file_c
  </code></pre>
  
  <p>Thanks in advance for any help.</p>