python3中re模块的finditer()函数报出AttributeError: 'callable_iterator' object has no attribute 'next'的错误

>>> s = 'This and that.'
>>>> re.finditer(r'(th\w+) and (th\w+)',s,re.I).next().groups()
Traceback (most recent call last):
  File "", line 1, in <module>
AttributeError: 

你可能感兴趣的:(Python基础,python3,re,正则表达式,报错)