PythiloMedium · 25 min · Task 77 of 100 · progress kept in this browser

Normalize an absolute path

Normalize an absolute POSIX path string using slash separators, dot and dot-dot. Going above root stays at root; repeated slashes collapse. Do not access the filesystem.

parts = ['a', 'b']
parts.pop()  # process ..
print('/'+'/'.join(parts))
Your task

Normalize an absolute POSIX path string using slash separators, dot and dot-dot. Going above root stays at root; repeated slashes collapse. Do not access the filesystem.