I need to change the script commented out to the one not commented out. Why?
# for x in sorted (fr, key=str.lower):
# tmpstr = x.rpartition(';')[2]
# if x != csv_contents and tmpstr == "folder\n":
# csv_contentsB += x
# elif x != csv_contents and tmpstr == "files\n":
# csv_contentsC += x
for x in sorted (fr, key=str.lower):
if x != csv_contents:
tmpstr = x.rpartition(';')[2]
if tmpstr == "folder\n":
csv_contentsB += x
elif tmpstr == "file\n":
csv_contentsC += x
--
https://mail.python.org/mailman/listinfo/python-list