KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Hey I am working on a very high performance file-managing/analyzing toolkit written in python. I want to create a function that gives me a list or something like that in a tree format. Something like in this question (java-related) From: dir/file dir/dir2/file2 dir/file3 dir3/file4 dir3/file5 Note: the list of paths is unsorted To: dir/ file dir2/ file2 file3 dir3/ file4 file5 [[dir, [file, [dir2, [file2]], file3]], [dir3, [file4, file5]]] something along those lines. I've been playing around with some ideas but none of them provided the speed that I would like to have. Note: I do already have the list of paths, so no worrying about that. The function takes paths list and gives tree list. Thanks in Advance
Tags (comma-separated)
Save Edits
Cancel