def remove_trailing_slash(filename: str):
    while filename.endswith('/'):
        filename = filename[:(- 1)]
    return filename
def remove_trailing_slash(filename: str):
    while filename.endswith('/'):
        filename = filename[:(- 1)]
    return filename