Examveda

What is the output of the following code:
import re
result = re.findall(r'bw+b', 'Hello, world!')
print(result)

A. ['Hello', 'world']

B. An error will occur

C. ['Hello,', 'world!']

D. ['H', 'w']

Answer: Option B


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

Join The Discussion

Related Questions on Regular Expressions in Python