os.listdir doc already says “The list is in arbitrary order”:
glob doc says “results are returned in arbitrary order”:
The question is more why users don’t read the documentation Well, as I wrote previously, if someone wants to work on these issues, I suggest to write a 3rd party tool to randomize listdir() order, the tool doesn’t have to be written in Python. And http://reproducible-builds.org/ already provides such tools