What will be the output of the following Python code?
import re
s = "A new day"
m = re.match(r'(.*)(.*?)', s)
print(m.group(2))
print(m.group(0))
import re
s = "A new day"
m = re.match(r'(.*)(.*?)', s)
print(m.group(2))
print(m.group(0))A. No output
A new day
B. No output
No output
C. [‘A’, ‘new’, ‘day’]
(‘A’, ‘new’, ‘day’)
D. Error
[‘A’, ‘new’, ‘day’]
Answer: Option A

Join The Discussion