Количество внутренних каталогов в Python
i want to make code using python from which i can count the directories which is in a directory and the files in it.i am getting number of files and filenames by using listdir() function and count also by using len(data) function.but i have directories in a directory & in that i have files. i am using below code.<br>please guide me for that <pre><br>пример ans=(Dir_name 56)
Что я уже пробовал:
import os img_folder_path = ("C:/Users/Uname/Desktop") dirListing = os.listdir(img_folder_path) print(dirListing) print(len(dirListing))