python

How To List Only Directories In Python

How To List Only Directories In Python to list only directories in python we use python os module. import os p=os.listdir(r’C:\Users\enaknar\Desktop\pycharm’) for i in p: if os.path.isdir(i): print(i) Here we are using two functions...

Python OS Module Tutorial and Examples

Python OS Module Tutorial and Examples To interact with the file system or to deal with filenames, paths, directories we use python os module. in this blog post i will show you some of...