Since all the strings of your given list are ended in .avi
extension, you could use a slicing feature.
sorted(lst, key=lambda x: int(x[:-4]))
Since all the strings of your given list are ended in .avi
extension, you could use a slicing feature.
sorted(lst, key=lambda x: int(x[:-4]))