I have the following directories and subdirectories with txfiles in it. I want to access them for reading the lines. But this does not work. can you help me out here?
main directory: 2009
sub directory: movies, albums, songs
each of these directory contains text files. I want to read through each lines of these text files
my pseudocode is as folllows
x = os.listdir("2009")
Now, x will be a list of [movies, albums, songs]
for el in x:
os.system("ls 2009/el")
for lines in os.popen(2009/el"):
print lines