0

I have python array with filepath in it, I need to sort the files path based on created date. Is there any inbuilt functionality exist for it.

  files = ["/path1/filename.text", "/path2/filename.text", "/path2/filename.text"] 
3
  • 1
    Here is another possible duplicate, stackoverflow.com/a/539024/4985099 Commented Aug 5, 2020 at 11:34
  • The above link demonstrates how to get the creation date for a file. You can use this as the key argument in sorted for example stackoverflow.com/questions/5213033/… Commented Aug 5, 2020 at 11:34
  • Thanks, I will try it. Commented Aug 5, 2020 at 11:40

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.