Discuss / Python / 这样才跑得通测试

这样才跑得通测试

Topic source
def trim(str):
    while len(str) > 0 and str[0] == ' ':
        str = str[1:]
    while len(str) > 0 and str[-1] == ' ':
        str = str[:-1]
    return str

  • 1

Reply