Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

split path in list of directories

>>> from pathlib import Path
>>> Path('C:/path/to/file.txt').parts
('C:', 'path', 'to', 'file.txt')
>>> Path(r'C:path	ofile.txt').parts
('C:', 'path', 'to', 'file.txt')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #split #path #list #directories
ADD COMMENT
Topic
Name
9+4 =