#coding=utf-8
import string
import re
str=‘i have 300 yuan, you 234 234 give me 200 again, then i have 500 yuan‘
iList= re.findall(r"\d+",str)
print "string:",str
print "total digit number:",len(iList)
标签:正则 str 分享图片 ota 图片 dig img print int
#coding=utf-8
import string
import re
str=‘i have 300 yuan, you 234 234 give me 200 again, then i have 500 yuan‘
iList= re.findall(r"\d+",str)
print "string:",str
print "total digit number:",len(iList)
标签:正则 str 分享图片 ota 图片 dig img print int
原文地址:https://www.cnblogs.com/xiaxiaoxu/p/8727910.html