Answers for "how to get the name of parent directory python os library"

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
4

python get parent directory

import os.path
os.path.dirname('C:Program Files')
Posted by: Guest on January-22-2020

Code answers related to "how to get the name of parent directory python os library"

Python Answers by Framework

Browse Popular Code Answers by Language