human
Get a filtered list of files in a directory
assistant
Here is some code to create a list `files` containing all files in directory '.' that starts with numbers between 0 and 9 and ends with the extension '.jpg'

files = [f for f in os.listdir('.') if re.match('[0-9]+.*\\.jpg', f)]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.