Answers for "os command to get a folders"

15

which folder python os

import os
cwd = os.getcwd()
Posted by: Guest on March-09-2020
0

how to see directory from os module

import pathlib

# define the path
currentDirectory = pathlib.Path('.')

for currentFile in currentDirectory.iterdir():
    print(currentFile)
Posted by: Guest on January-20-2021

Python Answers by Framework

Browse Popular Code Answers by Language