Vidyalelo
Python · Q44

Regular Expressions in Python

Programming · Python · question 44

Q44

What will be the output of the following code:import repattern = re.compile(r'b[A-Z]+b')result = pattern.findall('Hello, WORLD!')print(result)

A.
['Hello', 'WORLD']
Answer
B.
An error will occur
C.
['Hello,', 'WORLD!']
D.
['H', 'W']

Answer: Option A

Solution

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