Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final2 = []
- one = os.path.join("broken_file", "rating4")
- os.listdir(one)
- for x in os.listdir(one):
- two = os.path.join(one,x)
- if os.path.isdir(two):
- for y in os.listdir(two):
- three = os.path.join(two,y)
- if os.path.isdir(three):
- for z in os.listdir(three):
- four = os.path.join(three,z)
- if os.path.isdir(four):
- pass
- else:
- final2.append(four)
- else:
- final2.append(three)
- else:
- final2.append(two)
- sort(final2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement