Horje
directory name python Code Example
directory name python
# Directory name from path of file
import os
file_name = "/home/ubuntu/Project/demo.txt"
dir_name = os.path.dirname(file_name)
print(dir_name)




Python

Related
import status in django rest framework Code Example import status in django rest framework Code Example
xgboost feature importance Code Example xgboost feature importance Code Example
python ping ip address Code Example python ping ip address Code Example
how to make computer go in sleep mode using pythn Code Example how to make computer go in sleep mode using pythn Code Example
divide by zero error python exception handling Code Example divide by zero error python exception handling Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7