Choose the function whose output can be: <_sre.SRE_Match object; span=(4, 8), match=’aaaa’>.
(a) >>> re.search(‘aaaa’, “alohaaaa”, 0)
(b) >>> re.match(‘aaaa’, “alohaaaa”, 0)
(c) >>> re.match(‘aaa’, “alohaaa”, 0)
(d) >>> re.search(‘aaa’, “alohaaa”, 0)
The question was asked in an internship interview.
This key question is from Regular Expressions topic in section Regular Expressions and Files of Python