結果 : check if input is file or directory python