I am trying to read all files in a specific directory using os.listdir in python in Ubuntu. But the files are not alphabetically sorted just like Windows does. The weird thing is that it doesn't even read all files started with 'o' then go for 'j' then 'z'. It seems like totally random. And the same goes with files named only with numbers like it reads first '67.png' then '76.png' then '71.png'... I'm new to Linux so maybe unlike Windows it sorts them in another way like based on HEX.
I would appreciate if anyone helps me find out the reasoninng behind this apparent disorder.