Discuss / Python / 我的答案

我的答案

Topic source

Nb-Boom

#1 Created at ... [Delete] [Delete and Lock User]

    if s:

        if s[0] == ' ':

            return trim(s[1:])

        elif s[-1] == ' ':

            return trim(s[:-1])

        else:

            return(s)

    else:

         return(s)


  • 1

Reply