Vidyalelo
Python · Q62

Regular Expressions in Python

Programming · Python · question 62

Q62

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

A.
('we', 'are', 'humans')
B.
(we, are, humans)
C.
('we', 'humans')
D.
'we are humans'
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board