Modify file name sorting

When sorting the file names, for example, if 11 is in front of 2:
for example, if the file name is "20230506-180144-0.bmp"
, after reading, the file order is as follows, and it needs to be modified.
insert image description here
The modification method is as follows:

all_dat.sort(key=lambda x:int(x.split('.')[0].split('-')[2]))

Guess you like

Origin blog.csdn.net/weixin_39107270/article/details/130728877