Answers for "python parent from path"

0

How do I get the parent directory in Python?

from pathlib import Path
Path(Path.cwd()).parent
Posted by: Guest on November-29-2020
2

python get parent directory

from pathlib import Path
Path('C:Program Files').parent
Posted by: Guest on January-22-2020
0

how do i get parent directory python

from pathlib import Path
path = Path(Path.cwd())
print(path.parent)
Posted by: Guest on November-29-2020

Code answers related to "python parent from path"

Python Answers by Framework

Browse Popular Code Answers by Language