'str' object has no attribute 'group'为什么
import re
str1='mooc videonum=1000'
ma=re.sub(r'\d+', '1001', str1)
print ma.group()
运行结果为:AttributeError: 'str' object has no attribute 'group'
import re
str1='mooc videonum=1000'
ma=re.sub(r'\d+', '1001', str1)
print ma.group()
运行结果为:AttributeError: 'str' object has no attribute 'group'
2017-12-19
举报