I wish I could sort files from a folder in a python list

Well, I have doubts, I wish I could sort the files in a folder using a list in Python. The task I try is to sort pictures of the alphabet by the letter that contains the picture. The names of the pictures are not sorted alphabetically, sort them from a list with the OS module. Thank you for your attention