Choose the function whose output can be: <_sre.SRE_Match object; span=(4, 8), match=’aaaa’>.

Choose the function whose output can be: <_sre.SRE_Match object; span=(4, 8), match=’aaaa’>. Correct Answer >>> re.search(‘aaaa’, “alohaaaa”, 0)

The output shown above is that of a search function, whose pattern is ‘aaaa’ and the string is that of 8 characters. The only option which matches all these criteria is: >>> re.search(‘aaaa’, “alohaaaa”, 0)

Related Questions

Choose the function whose output can be: <_sre.sre_match object span="(4," match="aaaa">.