Examveda

What will be the output of the following Python code?
re.findall('good', 'good is good')
re.findall('good', 'bad is good')

A. [‘good’, ‘good’]
[‘good’]

B. (‘good’, ‘good’)
(good)

C. (‘good’)
(‘good’)

D. [‘good’]
[‘good’]

Answer: Option A


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

Join The Discussion

Related Questions on Regular Expressions in Python