I have multiple files and I need to extract the folder from its path.
folder1/folder2/templates/xyz.yaml
folder1/folderx/templates/abc.yaml
How can i extract folder2 and folderx in python.
I have multiple files and I need to extract the folder from its path.
folder1/folder2/templates/xyz.yaml
folder1/folderx/templates/abc.yaml
How can i extract folder2 and folderx in python.