Mar-18-2022, 11:11 PM
Using next() with os.walk() I can very neatly and easily get all files in a folder and ignore other folders if present.
I have to say, I don't really understand what's happening, but it works great!
I have to say, I don't really understand what's happening, but it works great!
files = next(os.walk(path2talkfiles))[2] files.sort()Could someone elaborate a little?