Help sorting a list by file extension
Peter A. Schott
paschott at no.yahoo.spamm.com
Fri Aug 12 02:06:17 CEST 2005
Trying to operate on a list of files similar to this:
I want to sort them in numeric order instead of string order. I'm starting with
for filename in [filename for filename in os.listdir(os.getcwd())]:
#Write to file, but with filenames sorted by extension
Desired result is a file containing something like:
I need to order by that extension for the file output.
I know I've got to be missing something pretty simple, but am not sure what.
Does anyone have any ideas on what I'm missing?
More information about the Python-list