adplus-dvertising
frame-decoration

Question

What is the output of the code shown?
re.match('sp(.*)am', 'spam')

a.

<_sre.SRE_Match object; span=(1, 4), match='spam'>

b.

<_sre.SRE_Match object; span=(0, 4), match='spam'>

c.

No output

d.

Error

Posted under Python

Answer: (b).<_sre.SRE_Match object; span=(0, 4), match='spam'>

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the code shown?