智健blog

python去除首/尾的某些字符

    #while循环去除首/尾的某些字符
    while(new_s[0]=='0'):
        new_s = new_s[1:]
posted @ 2022-10-23 16:24  智健  阅读(56)  评论(0编辑  收藏  举报