I'm trying to list the files in my directory. The directory is /home/user/Desktop/Test/ Within Test, there are 3 folders, a,b,c and within each of the folders a,b,c there are 10 gz files numbered in order 1-10
import os
subdir=os.walk("/home/user/Desktop/Test")
for i in subdir:
for dir in i:
print dir
I get an output of
a
b
c
I want to get
1.gz
2.gz
3.gz
4.gz
5.gz
6.gz
7.gz
8.gz
9.gz
10.gz
Where was i wrong?