i have a question that is " how can i write it standard "
How to define "i" varieble only for loop iterator?
i=0
for(dirpath, dirname, filename) in walk(path) :
i += 1
if(i == 2):
print(dirpath, dirname, filename)
break
You really don't need the for loop at all.
How about print(walk(path)[2])?
Обсуждают сегодня