os.remove(path)
+def fix_multiple_slashes(path: str) -> str:
+ """Fixes multi-slashes in paths or path-like strings
+
+ Args:
+ path: the path in which to remove multiple slashes
+
+ >>> p = '/usr/local//etc/rc.d///file.txt'
+ >>> fix_multiple_slashes(p)
+ '/usr/local/etc/rc.d/file.txt'
+
+ >>> p = 'this is a test'
+ >>> fix_multiple_slashes(p) == p
+ True
+ """
+ return re.sub(r'/+', '/', path)
+
+
def delete(path: str) -> None:
"""This is a convenience for my dumb ass who can't remember os.remove
sometimes.