I have a list that includes files and directories ie: list = ['file', 'file2', 'dir1','file3','dir2' ] I want to sort it so it looks like this ['dir1', 'dir2', 'file1','file2','file3' ] I'm just wondering if there is an easy way to do this Thanks Mike