Python Does Path Exists Leetcode 15040331