List sort - alphanumeric? - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: List sort - alphanumeric? (/thread-21587.html) |
List sort - alphanumeric? - papsphilip - Oct-05-2019 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 RE: List sort - alphanumeric? - Larz60+ - Oct-05-2019 see: https://stackoverflow.com/a/11150413 RE: List sort - alphanumeric? - papsphilip - Oct-05-2019 yes worked! thank a lot |