ID EN
Pathlib

anchor

Python 3.11 🇮🇩 Bahasa Indonesia

Penggabungan drive dan root:

Syntax

PYTHON
PurePath.anchor

Contoh

Example 1
PYTHON
>>> PureWindowsPath('c:/Program Files/').anchor
'c:\\'
>>> PureWindowsPath('c:Program Files/').anchor
'c:'
>>> PurePosixPath('/etc').anchor
'/'
>>> PureWindowsPath('//host/share').anchor
'\\\\host\\share\\'