Answers for "get the parent folder python"

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
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 "get the parent folder python"

Python Answers by Framework

Browse Popular Code Answers by Language