You can use a custom sorting function to extract the number from each element of the list and use it as the comparison key. You'd need to convert it to int
to ensure it compares like number:
>>> lst = ['100.avi', '10000.avi', '10002.avi', '1003.avi']
>>> sorted(lst, key=lambda x: int(x.split('.', 1)[0]))
['100.avi', '1003.avi', '10000.avi', '10002.avi']