I have a list of strings with my filenames:
flist = ['0.png','10.png', '3.png', '4.png', '100.png']
flist.sort()
print(flist)
Output:
['0.png', '10.png', '100.png', '3.png', '4.png']
But I want:
['0.png', '3.png', '4.png', '10.png', '100.png']
Is there a simple way to do this?
split()to isolate the numerical value. The duplicate works in a whole range of cases. The title of your question (should other people stumble across this in searches) belies the specific case you have. - roganjoshsplit()does? - roganjosh