I have list containing some paths:
['folder1/folder2/Module1', 'folder4/folder5/Module2', 'folder7/folder8/Module3', 'folder12/folder13/Module4', 'folder17/folder20/folder50/Module5' .. etc]
What would be the best way to extract each element of that list and create new list or some other place to store that path with it's specific name?
Mu current code for going through each element of the list and storing it one by one, but I can't generate new list for each element, not sure if that is even possible:
for j in range(len(listOfPaths)):
del pathList[:]
path = listOfPaths[j]
pathList.append(path)
So to clarify, at the end what I need is to get one list list[Module1] that contains only 'folder1/folder2/Module1', and second one list[Module2] with only path to Module2, etc...