[Tutor] Location of found item in list.
Chris Hengge
pyro9219 at gmail.com
Thu Oct 19 01:15:07 CEST 2006
I'm looking for a way to do the following.
for item in limitedLineList:
if item in directoryList:
print match.ljust(20) + limitedLineList[count].ljust(20) +
directoryList[count].ljust(20)
else:
print fail.ljust(20) + limitedLineList[count].ljust(20) +
directoryList[count].ljust(20)
os.rename(pathName + directoryList[count], pathName +
limitedLineList[count])
count = count + 1
Where I have underlined, needs to be the item from the directoryList, and
I'm unable to find a way to return that.
The code is actually doing what I want correctly, (cheated a test by hand
changing variables), but I need to find the directory location.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061018/d00f7f09/attachment.htm
More information about the Tutor
mailing list