Python | Functions | Question 7 Read Improve Improve Improve Like Article Like Save Article Save Report issue Report What is the output of the following program : import re sentence = 'horses are fast'regex = re.compile('(?P<animal>\w+) (?P<verb>\w+) (?P<adjective>\w+)') matched = re.search(regex, sentence) print(matched.groupdict()) (A) {‘animal’: ‘horses’, ‘verb’: ‘are’, ‘adjective’: ‘fast’} (B) (‘horses’, ‘are’, ‘fast’) (C) ‘horses are fast’ (D) ‘are’ Answer: (A) Explanation: This function returns a dictionary that contains all the matches.Quiz of this Question Last Updated : 28 Jun, 2021 Like Article Save Article Previous Python-Quizzes | Output Type | Question 12 Next Python-Quizzes | Functions | Question 8 Share your thoughts in the comments Add Your Comment Please Login to comment...