>Yup. Make a list of all the file names, write a key function that >extracts the numbery bits, sort the list based on that key function, and >go to town. > >Alternatively, when you create the files in the first place, make sure >to use more leading zeros than you could possibly need. >xxx_chunk_000001 sorts less than xxx_chunk_000010.
So, if I write import glob; for f in glob.glob('*chunk*'): print(f) it will print in order. Is that really sorted or it is not guaranteed? Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list