Python Forum

Full Version: List sort - alphanumeric?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
i ve just started learning python and i have bumped into a problem when reading folder names from a directory. they are not sorted the same way i am viewing them in my directory.

f1,f2,f3.....,f10,f11,...f20,f21,f23 becomes f1,f10,f11,f12...f2,f21,f22...etc

i would like to sort them by name like in windows
yes worked! thank a lot