Discuss / Python / 打卡

打卡

Topic source

def trim(x):

    while x[0] == ' ':

          x = x[1:]

    while x[-1] == ' ':

          x = x[:-1]

    return x


  • 1

Reply