def removeBorderSpaces(inputStr):
    """
    Function that removes trailing and leading whitespaces

    Argument:
        -inputStr (str)

    Returns:
        A str of inputStr without leading and trailing whitespaces

    """
    if len(inputStr) == 0:
        return str()
    if inputStr[0] == ' ':
        return removeBorderSpaces(inputStr[1:])
    if inputStr[-1] == ' ':
        return removeBorderSpaces(inputStr[:-1])
    return inputStr