I have a dynamic list which might look like this:
['test_data/reads1.fq', 'test_data/reads_2.fq', 'test_data/new_directory/ok.txt',
'test_data/new_directory/new_new_dir/test.txt', 'hello/hello1.txt'] and so on
I want to construct hierarchy tree structure from this file:
test_data
files
new_directory
file
new_new_dir
file
hello
How can I do this in Python?
Following code will construct list to the root of the file. How can I proceed after that?
[i.split('/') for i in a]