这是我的代码和错误!请给我一个提示
import os
def traverse(path, d):
for item in os.listdir(path):
item = os.path.join(path, d)
try:
traverse(path,d)
except:
print (path)
我的错误:
traverse ("test",0)
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
traverse ("test",0)
File "C:\Users\Phuchu\Desktop\Python\homework8.py", line 65, in traverse
for item in os.listdir(path):
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'test\\*.*'