PyDocs

Nav

File and Directory Access

PurePath.root

pathlib

attribute of PurePath (source)
The root of the path, if any.
1 Example
>>> PureWindowsPath('c:/Program Files/').root
'\\'
>>> PureWindowsPath('c:Program Files/').root
''
>>> PurePosixPath('/etc').root
'/'
from the Python docs
See Also
No see-alsos for pathlib/PurePath.root
0 Notes
No notes for PurePath.root