Vidyalelo
Python · Q17

Regular Expressions in Python

Programming · Python · question 17

Q17

What will be the output of the following code:import repattern = re.compile(r'd+')result = pattern.search('There are 5 apples and 3 oranges.')print(result.group())

A.
5
B.
An error will occur
C.
3
D.
['5', '3']
Answer

Answer: Option D

Solution

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