#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)
原文地址:https://www.cnblogs.com/xiaxiaoxu/p/8727910.html
时间: 2024-10-07 13:38:46