This is the directory structure
10
files
2009
2010
11
files
2007
2010
2006
I am trying to get full path names of all the directories inside files
import os
x = os.walk('.').next()[1]
print x # prints ['33', '18', '27', '39', '2', '62', '25']
for a in x:
y = os.walk(a).next()[1]
print y # prints ['files']
I tried a nested for but getting stopiteration error.
What I am intending to do is get something like below,
['10/files/2009','10/files/2010','11/files/2007','11/files/2010','10/files/2006']
How to do it in python?