A43218. 下列代码的输出是__________。import reline ='Cats are smarter than dogs'mathcObj = re.match(r'(.*)are(.*?).*',line)print(mathcObj .group(1))
填空题
中等
知识点
题目描述
下列代码的输出是__________。
import re
line ='Cats are smarter than dogs'
mathcObj = re.match(r'(.*)are(.*?).*',line)
print(mathcObj .group(1))
参考答案
<p>Cats</p>答案解析
主要考察正则表达式,依据正则表达式的规则,答案为Cats。
上一题
下一题