71. Simplify Path class Solution: def simplifyPath(self, path: str) -> str: path = path.split("/") res = [] for i in range(len(path)): if path[i] == "." or path[i] == "": continue elif path[i] == "..": if res: res.pop() else: res.append(path[i]) return "/" + "/".join(res)