def delslash(value):
    """
    Remove slash from start and end

    >>> delslash('/foo/bar/')
    'foo/bar'

    :type str:
    :rtype: str
    """
    if value.startswith('/'):
        value = value[1:]
    if value.endswith('/'):
        value = value[:-1]
    return value