Canonicalize a Unix-style absolute file path by resolving '.' and '..' segments.
Constraints
Example
>>> simplify_path("/home/")
'/home'
>>> simplify_path("/../")
'/'
>>> simplify_path("/home//foo/")
'/home/foo'
>>> simplify_path("/a/./b/../../c/")
'/c'
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints