When using os.listdir method I need to tell which item in the resulting list is a directory or just a file.
I've faced a problem when I had to go through all the directories in this list, and then add a file in every single directory.
Is there a way to go through this list and remove all files from it? If it isn't possible to do with os.listdir, what method should I use instead?
Thanks.