import re
import numpy
a=" 9fil3dj11P0jAsf11j"
print (re.findall(r"\d+\.?\d*",a))
b=[]
b=(re.findall(r"\d+\.?\d*",a))
c=0
print(b)
a = {}
for i in b:
if b.count(i)>1:
a[i] = b.count(i)
m = b.count(i)
c=int(m*(int(i)))
print (i,m,(m)*(i))
print (c)
统计字符串相同数字之和
最新推荐文章于 2021-11-19 11:51:52 发布