此外当指定内容不在头尾处时,并不会被去除。 s = ' \n \t hello\n'.strip('\n') print(s) # # hello s = '\n \t hello\n'.strip('\n') print(s)
確定! 回上一頁