Answers for "python check is a folder"

15

how to check in which directory python in running

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

check if path is a folder python

import os

# check the if the path is a directory
print(os.path.isdir("path"))

# check if the path is a file
print(os.path.isfile("path"))
Posted by: Guest on August-13-2021

Code answers related to "python check is a folder"

Python Answers by Framework

Browse Popular Code Answers by Language