I am not getting the output in order while i am sorting the list of files in directory
import os
arr = sorted(os.listdir(r'D:\\Krish\\syn\\Python\\Washington'))
print(arr)
below is the output:
['1.pdf', '10.pdf', '11.pdf', '12.pdf', '2.pdf', '3.pdf', '4.pdf', '5.pdf', '6.pdf', '7.pdf', '8.pdf', '9.pdf']
keytosortedto change the sorting criteria)