On 2017-05-23, Mahmood Naderan via Python-list <python-list@python.org> wrote:

> import glob;
> for f in glob.glob('*chunk*'):
>       print(f)
>
> it will print in order. Is that really sorted or it is not guaranteed?

https://docs.python.org/2/library/glob.html
https://docs.python.org/3/library/glob.html

It's in the first sentence:

  The glob module finds all the pathnames matching a specified
  pattern according to the rules used by the Unix shell, although
  **RESULTS ARE RETURNED IN ARBITRARY ORDER**.

[my emphasis]

-- 
Grant Edwards               grant.b.edwards        Yow! Why is everything made
                                  at               of Lycra Spandex?
                              gmail.com            

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to