Discuss / Python / 借鉴一下

借鉴一下

Topic source

Jerry bonus

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

    if s[:1] == ' ':

        return trim(s[1:])  

    elif s[-1:] == ' ':

        return trim(s[:-2])

    else:

        return s


  • 1

Reply