What is the use of split function of os.path module?
Answer:
The split( ) method is used to split the path name into a pair, head and tail .
Here,
- tail is the last path name component
- head is everything leading up to that.
Syntax:
os.path.split(path)