Working with os paths is a prevalent task, especially when working on a console application in Python. Recently, I had to add a change to an existing feature where it was mandatory to return the last modified directory on a specific target. In Python, we have the opportunity to count with different libraries; in this…