I have this list of files:
1.jpg, 2.jpg, ..., 10.jpg, ...
If I do a python os.listdir(".") i have all files listed but in alphabetical order like this:
[1.jpg, 10.jpg, 11.jpg, ..., 2.jpg, 20.jpg....]
But I want them ordered by its numerical value
[1.jpg, 2.jpg ,...10 ,11 ,12... ]
How do I reorder the list to have this done?
tx