Still no progress with this myself. <br><br>For clarification if I didn't provide enough earlier, <br>for item in list1:<br>&nbsp;&nbsp;&nbsp; if item in list2:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print item and list[object at location where matched item] &lt;-- need this location.
<br><br><div><span class="gmail_quote">On 10/18/06, <b class="gmail_sendername">Chris Hengge</b> &lt;<a href="mailto:pyro9219@gmail.com">pyro9219@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm looking for a way to do the following. <br><br>for item in limitedLineList:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if item in directoryList:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print match.ljust(20) + limitedLineList[count].ljust(20) + directoryList[<span style="text-decoration: underline;">

count</span>].ljust(20)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print fail.ljust(20) + limitedLineList[count].ljust(20) + directoryList[<span style="text-decoration: underline;">count</span>].ljust(20)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; os.rename(pathName + directoryList[
<span style="text-decoration: underline;">count</span>], pathName + limitedLineList[count])<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; count = count + 1<br><br>Where I have underlined, needs to be the item from the directoryList, and I'm unable to find a way to return that. 
<br><br>The code is actually doing what I want correctly, (cheated a test by hand changing variables), but I need to find the directory location.<br><br>Thanks.<br>

</blockquote></div><br>