Examveda
Examveda

What will be the output of the following Python code?
sentence = 'we are humans'
matched = re.match(r'(.*) (.*?) (.*)', sentence)
print(matched.group(2))

A. 'are'

B. 'we'

C. 'humans'

D. 'we are humans'

Answer: Option C


This Question Belongs to Python Program >> Regular Expressions In Python

Join The Discussion

Related Questions on Regular Expressions in Python