Q. What is the output of the following code?
Code:import re
sentence = 'I am fine'
regex = re.compile('(?P<subject>\w+) (?P<verb>\w+) (?P<adjective>\w+)')
matched = re.search(regex, sentence)
print(matched.groupdict())
✅ Correct Answer: (A)
{‘subject’: ‘I’, ‘verb’: ‘am’, ‘adjective’: ‘fine’}