代码:
import os path = r"C:UsersAdministratorDesktop***" print('filenum:',len([lists for lists in os.listdir(path) if os.path.isfile(os.path.join(path, lists))]))
代码:
import os path = r"C:UsersAdministratorDesktop***" print('filenum:',len([lists for lists in os.listdir(path) if os.path.isfile(os.path.join(path, lists))]))