くだすれPython(超初心者用) その6
レス数が900を超えています。1000を超えると表示できなくなるよ。
0910デフォルトの名無しさん
2010/04/19(月) 11:50:17より高速に処理するにはどう記述したら良いでしょうか?
i = 0
path = '/hoge/'
files = os.listdir(path)
del_list = []
while i < len(files):
File = path + files[i]
j = i + 1
while j < len(files):
File_check = path + files[j]
if os.path.getsize(File) == os.path.getsize(File_check):
del_list.append(File_check)
j = j + 1
for del_file in del_list:
os.remove(del_file)
レス数が900を超えています。1000を超えると表示できなくなるよ。