def file_sort(my_list):
def alphanum_key(key):<EOL><INDENT>"""<STR_LIT>"""<EOL>return [int(s) if s.isdigit() else s for s in re.split("<STR_LIT>", key)]<EOL><DEDENT>my_list.sort(key=alphanum_key)<EOL>return my_list<EOL>
Sort a list of files in a nice way.
eg item-10 will be after item-9