# 注意使用int的自动整理功能
# 定义空字符串,后用append添加
s = input()
len = len(s)
s0 = []
for i in range(len):
if ord('0')<= ord(s[i]) <= ord('9'):
s0.append(s[i])
s0 = ''.join(s0)
print(int(s0))
7-5 字符转换
最新推荐文章于 2023-12-18 22:45:22 发布
# 注意使用int的自动整理功能
# 定义空字符串,后用append添加
s = input()
len = len(s)
s0 = []
for i in range(len):
if ord('0')<= ord(s[i]) <= ord('9'):
s0.append(s[i])
s0 = ''.join(s0)
print(int(s0))