def getnum(str):
n=len(str)
s=""
for i in range(n):
ss=str[i]
if ss.isdigit():
s=s+ss
return s
Python 提取字符串中数字
阅读 71
2023-04-04
def getnum(str):
n=len(str)
s=""
for i in range(n):
ss=str[i]
if ss.isdigit():
s=s+ss
return s
相关推荐
精彩评论(0)