浙大版《Python 程序设计》题目集 第3章-5 字符转换 (15分)

s = input()
li = []
for each in s:
    if each.isdigit():
        li.append(each)
number = int(''.join(li))
print(number)  
发布了33 篇原创文章 · 获赞 0 · 访问量 261

猜你喜欢

转载自blog.csdn.net/weixin_42229583/article/details/104573241