Given the directory of all files with numerical names, I am currently sorting and filtering the list of directories in two steps.
#files = os.listdir(path) files = ["0", "1", "10", "5", "2", "11", "4", "15", "18", "14", "7", "8", "9"] firstFile = 5 lastFile = 15
Is there a python function that combines filtering and sorting operations so that the list needs to be repeated only once?
source share