Answers for "get contents of a directory python"

8

get directory of file python

import os 
dir_path = os.path.dirname(os.path.realpath(__file__))
Posted by: Guest on April-03-2020
0

python program to print the contents of a directory using os module

import os
li = os.listdir(".")
print(li)
Posted by: Guest on February-24-2021

Code answers related to "get contents of a directory python"

Python Answers by Framework

Browse Popular Code Answers by Language