Answers for "identify the file is directory python"

0

python find directory of file

import os
  
print('File name :    ', os.path.basename(__file__))
print('Directory Name:     ', os.path.dirname(__file__))
Posted by: Guest on January-10-2022

Code answers related to "identify the file is directory python"

Python Answers by Framework

Browse Popular Code Answers by Language