公共和儿媳

Discuss / Python / 切片递归

切片递归

Topic source

张杰轩

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

    if s[:1] == ' ':

        s=trim(s[1:])

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

        s=trim(s[:-1])

    return s


  • 1

Reply