def remove_slash(part: str) -> str:
    """Remove starting and ending slash from a string"""
    if part[0] == "/":
        part = part[1:]
    if part[-1] == "/":
        part = part[:-1]
    return part