Assume that folder A contains the following files:
0.jpg
1.jpg
2.jpg
.
.
.
n.jpg
.
.
.
Now, a python script looks into folder A and using
for path, dirs, files in os.walk(path_to_A):
for filename in files:
fullpath = os.path.join(path, filename)
reads the filename
(reads each image) and updates an array B.
The size of array B is exactly that of the number of images inside A.
My question is, will it ALWAYS be the case that the j-th position of the array will correspond to the j.jpg image file?
For example if the names inside folder A differ ( but are sorted in the lexicographic order - btw, is it really the lexicographic order that is preserved when we list a directory in win or linux OS? ) will this be depicted in array B?
Thanks!